Thank you for your interest in contributing to the GitHub Project Manager MCP Server! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Workflow
- Pull Request Process
- Coding Standards
- Testing Guidelines
- Documentation Guidelines
- Component-Specific Guidelines
This project adheres to a Code of Conduct that all contributors are expected to follow. Please read CODE_OF_CONDUCT.md before contributing.
- Node.js 18.x or higher
- npm or pnpm
- Git
- A GitHub account
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/github-project-manager-mcp.git cd github-project-manager-mcp - Add the original repository as a remote:
git remote add upstream https://github.com/original-owner/github-project-manager-mcp.git
- Install dependencies:
npm install # or pnpm install - Create a
.envfile with your GitHub credentials:GITHUB_TOKEN=your_personal_access_token GITHUB_OWNER=your_github_username_or_org GITHUB_REPO=your_repository_name
- Build the project:
npm run build
-
Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bugfix-name -
Make your changes, following the coding standards
-
Run tests to ensure your changes don't break existing functionality:
npm test -
Run linting to ensure code quality:
npm run lint
-
Commit your changes with a descriptive commit message:
git commit -m "feat: add new feature" # for features git commit -m "fix: resolve issue with X" # for bugfixes git commit -m "docs: update documentation" # for documentation git commit -m "test: add tests for feature X" # for tests git commit -m "refactor: improve code structure" # for refactoring
-
Push your branch to your fork:
git push origin feature/your-feature-name
-
Create a pull request from your fork to the original repository
- Ensure your PR includes a clear description of the changes and the purpose
- Update documentation if necessary
- Add tests for new functionality
- Ensure all tests pass
- Make sure your code follows the project's coding standards
- Respond to any feedback from reviewers
This project follows strict coding standards to maintain code quality and consistency:
- Use TypeScript for all new code
- Define explicit types for function parameters and return values
- Avoid using
anytype when possible - Use interfaces for object shapes
- Use enums for fixed sets of values
- Use 2 spaces for indentation
- Use single quotes for strings
- Use semicolons at the end of statements
- Use PascalCase for class names and interfaces
- Use camelCase for variables, functions, and methods
- Use UPPER_CASE for constants
- Add JSDoc comments for public APIs
- Follow Clean Architecture principles
- Keep concerns separated between layers
- Use dependency injection when appropriate
- Make code testable by avoiding tight coupling
- Write unit tests for all new functionality
- Use Jest for testing
- Mock external dependencies
- Aim for high test coverage (at least 80%)
Example unit test:
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);
});
it('should create a project successfully', async () => {
// Arrange
const projectData = {
title: 'Test Project',
description: 'Test Description',
visibility: 'private'
};
mockRepo.mockCreateProject.mockResolvedValue({ id: 'proj_123', ...projectData });
// Act
const result = await service.createProject(projectData);
// Assert
expect(result.id).toBe('proj_123');
expect(result.title).toBe('Test Project');
expect(mockRepo.mockCreateProject).toHaveBeenCalledWith(projectData);
});
});- Write integration tests for API interactions
- Use nock to mock external API calls
- Test error handling and edge cases
- Write end-to-end tests for critical workflows
- Test the full system from API to response
- Add JSDoc comments for all public APIs
- Include parameter descriptions and return types
- Document exceptions that may be thrown
Example:
/**
* Creates a new project with the specified properties
*
* @param {CreateProject} data - The project data
* @param {string} data.title - The project title
* @param {string} data.description - The project description
* @param {string} data.visibility - The project visibility ('private' or 'public')
* @returns {Promise<Project>} The created project
* @throws {ValidationError} If the project data is invalid
* @throws {UnauthorizedError} If the user is not authorized
*/
async createProject(data: CreateProject): Promise<Project> {
// Implementation
}- Update the user guide when adding new features
- Add examples for new functionality
- Keep the API reference up to date
- Keep domain entities pure and free from external dependencies
- Use interfaces to define repository contracts
- Define clear validation rules
- Implement repository interfaces
- Handle external API communication
- Map external data to domain entities
- Coordinate between repositories
- Implement business logic
- Handle transactions and error mapping
- Define tool schemas with Zod
- Implement proper request validation
- Format responses according to MCP specification
If you need help with contributing:
- Check the documentation
- Look for existing issues that might be related
- Create a new issue with your question
- Reach out to the maintainers
Thank you for contributing to the GitHub Project Manager MCP Server!