This document outlines the development workflow for contributing to the GitHub Project Manager MCP Server.
The development workflow follows these steps:
- Issue Creation: All work starts with an issue
- Branch Creation: Create a branch for your work
- Development: Make your changes
- Testing: Write and run tests
- Pull Request: Submit your changes for review
- Review: Address feedback
- Merge: Changes are merged
- Release: Changes are included in a release
Before starting work, ensure there's an issue that describes what you're working on:
- Check if an issue already exists
- If not, create a new issue with:
- Clear title
- Detailed description
- Steps to reproduce (for bugs)
- Expected behavior
- Actual behavior (for bugs)
- Any relevant screenshots or logs
Issues are categorized with labels:
bug: Something isn't working as expectedenhancement: New feature or improvementdocumentation: Documentation improvementsgood first issue: Good for newcomershelp wanted: Extra attention is neededquestion: Further information is requestedwontfix: This will not be worked on
- Comment on an issue if you want to work on it
- Wait for a maintainer to assign it to you
- Don't start work on an issue that's assigned to someone else
Use the following naming convention for branches:
feature/issue-number-short-descriptionfor new featuresfix/issue-number-short-descriptionfor bug fixesdocs/issue-number-short-descriptionfor documentationrefactor/issue-number-short-descriptionfor refactoringtest/issue-number-short-descriptionfor test improvements
Example: feature/123-add-sprint-metrics
# Ensure you're on the main branch
git checkout main
# Pull the latest changes
git pull upstream main
# Create a new branch
git checkout -b feature/123-add-sprint-metrics# Fetch the latest changes from upstream
git fetch upstream
# Rebase your branch on the latest main
git rebase upstream/main
# If there are conflicts, resolve them and continue
git rebase --continue
# Push your updated branch (force push if you've rebased)
git push origin feature/123-add-sprint-metrics --force- Make your changes following the coding standards
- Run the server locally to test your changes:
npm run dev
- Use the examples in the
examples/directory to test your changes
Follow the Conventional Commits specification:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
Types:
feat: A new featurefix: A bug fixdocs: Documentation changesstyle: Changes that don't affect the code's meaning (formatting, etc.)refactor: Code changes that neither fix a bug nor add a featureperf: Performance improvementstest: Adding or correcting testschore: Changes to the build process or auxiliary tools
Examples:
feat(sprint): add sprint metrics calculation
fix(milestone): resolve issue with milestone due date formatting
docs(api): update API reference for create_roadmap tool
-
Push your branch to your fork:
git push origin feature/123-add-sprint-metrics
-
Create a pull request from your fork to the original repository:
- Go to the original repository
- Click "Pull Requests" > "New Pull Request"
- Select "compare across forks"
- Select your fork and branch
- Click "Create Pull Request"
-
Fill in the pull request template:
- Reference the issue number
- Describe the changes
- List any dependencies
- Mention any breaking changes
-
Wait for the CI checks to complete
-
Request a review from a maintainer
- Make the requested changes
- Push the changes to your branch
- Respond to the review comments
- Request a re-review if needed
Once your pull request is approved:
- A maintainer will merge your pull request
- The branch will be deleted automatically
- The issue will be closed automatically (if you used "Fixes #123" in your PR description)
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage
# Run E2E tests
npm run test:e2e- Create test files in the
__tests__directory - Name test files with
.test.tssuffix - Use Jest's describe/it syntax
- Mock external dependencies
- Test both success and error cases
Example:
import { ProjectManagementService } from '../services/ProjectManagementService';
import { MockGitHubRepository } from './mocks/MockGitHubRepository';
describe('ProjectManagementService', () => {
let service: ProjectManagementService;
let mockRepo: MockGitHubRepository;
beforeEach(() => {
mockRepo = new MockGitHubRepository();
service = new ProjectManagementService('owner', 'repo', 'token', mockRepo);
});
describe('createProject', () => {
it('should create a project successfully', async () => {
// Test implementation
});
it('should throw validation error for invalid data', async () => {
// Test implementation
});
});
});Releases are managed by the maintainers:
- Maintainers create a release branch
- Version is bumped according to Semantic Versioning
- Changelog is updated
- Release notes are created
- Release is published
The project uses GitHub Actions for CI:
- Build: Ensures the project builds successfully
- Lint: Checks code style and quality
- Test: Runs unit and integration tests
- E2E: Runs end-to-end tests
- Coverage: Reports test coverage
All CI checks must pass before a pull request can be merged.
- ESLint
- Prettier
- TypeScript Hero
- Jest Runner
- GitLens
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.updateImportsOnFileMove.enabled": "always",
"jest.autoRun": "off"
}Error: Cannot find module './build/index.js'
Solution: Run npm run build to compile the TypeScript code.
Error: Cannot find module '@modelcontextprotocol/sdk'
Solution: Run npm install to ensure all dependencies are installed.
Error: Property 'X' does not exist on type 'Y'
Solution: Check the type definitions and ensure you're using the correct properties.
If you encounter any issues with the development workflow:
- Check the documentation
- Ask in the issue you're working on
- Create a new issue with the
questionlabel
Happy coding!