Thank you for your interest in contributing to the GitLab API! This guide will help you get started with development.
- Node.js >= v18.0.0
- npm or yarn package manager
- Git
-
Clone the repository:
git clone https://github.com/sargonpiraev/gitlab-mcp-server cd gitlab-mcp-server -
Install dependencies:
npm install
-
Set up environment:
cp .env.example .env # Edit .env with your API credentials -
Build the project:
npm run build
# Run in development mode with auto-reload
npm run dev
# Build the project
npm run build
# Run tests
npm run test
# Run linting
npm run lint
# Format code
npm run format
# Type checking
npm run typecheckWe use the following tools to maintain code quality:
- ESLint for linting
- Prettier for formatting
- TypeScript for type checking
- Jest for testing
- Commitlint for commit message validation
We follow Conventional Commits specification:
feat: add new functionality
fix: bug fixes
docs: documentation changes
style: formatting changes
refactor: code refactoring
test: adding tests
chore: maintenance tasks# Run all tests
npm run test
# Run tests with coverage
npm run test -- --coverage
# Run tests in watch mode
npm run test -- --watchWe use semantic-release for automated versioning and publishing:
- Create a pull request with your changes
- Ensure all tests pass and code is properly formatted
- Use conventional commit messages
- Once merged to main, semantic-release will automatically:
- Determine the next version number
- Generate release notes
- Publish to npm
- Create a GitHub release
- Fork the repository
- Create a branch from
main - Make your changes with proper tests
- Run the full test suite to ensure everything works
- Update documentation if needed
- Submit a pull request with a clear description
- Tests pass (
npm run test) - Code is formatted (
npm run format:check) - No linting errors (
npm run lint) - Types are correct (
npm run typecheck) - Documentation is updated (if applicable)
- Conventional commit messages are used
By contributing to gitlab, you agree that your contributions will be licensed under the MIT License.