Thank you for your interest in contributing to MCP GitLab! This document provides guidelines and instructions for contributing to the project.
By participating in this project, you agree to abide by our Code of Conduct.
- Check if the issue already exists in the issue tracker
- Use the appropriate issue template
- Provide clear description and steps to reproduce
- Include relevant logs, error messages, and system information
- Open a feature request issue
- Clearly describe the problem it solves
- Provide use cases and examples
- Discuss implementation approach if possible
-
Fork the Repository
git clone https://github.com/Vijay-Duke/mcp-gitlab.git cd mcp-gitlab -
Create a Feature Branch
git checkout -b feature/your-feature-name
-
Set Up Development Environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -e ".[dev,test]" pre-commit install
-
Make Your Changes
- Follow the existing code style
- Add/update tests for your changes
- Update documentation as needed
- Keep commits focused and atomic
-
Run Tests Locally
make test # Run all tests make lint # Check code style make format # Auto-format code make type-check # Run type checking
-
Submit a Pull Request
- Push your branch to your fork
- Open a PR against the
mainbranch - Fill out the PR template completely
- Ensure all CI checks pass
- Wait for review and address feedback
- Follow PEP 8 for Python code
- Use Black for formatting (configured in
pyproject.toml) - Use meaningful variable and function names
- Add type hints where appropriate
- Document complex logic with comments
- Write tests for new functionality
- Maintain or improve code coverage
- Use pytest for testing
- Mock external dependencies appropriately
- Include both unit and integration tests
- Update README.md for user-facing changes
- Add docstrings to new functions/classes
- Update API documentation if applicable
- Include examples in docstrings
Follow conventional commits format:
type(scope): subject
body (optional)
footer (optional)
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changesrefactor: Code refactoringtest: Test changeschore: Build/tooling changes
When adding new GitLab tools:
- Define the tool constant in
constants.py - Add tool description in
tool_descriptions.py - Implement handler in
tool_handlers.py - Add tool definition in
tool_definitions.py - Update the handler mapping
- Write comprehensive tests
- Update README with the new tool
- All PRs require at least one review
- CI checks must pass
- Reviewers will check for:
- Code quality and style
- Test coverage
- Documentation
- Security concerns
- Performance implications
Releases are automated through GitHub Actions when a version tag is pushed:
git tag v1.0.0
git push origin v1.0.0- Open a discussion in GitHub Discussions
- Reach out to maintainers through issues
- Check existing documentation and issues first
By contributing, you agree that your contributions will be licensed under the project's Apache 2.0 License.