Add support for all pull request operations documented in README.md that were
previously missing from the MCP server implementation. This includes:
- get_pull_request: Get details of a specific pull request
- list_pull_requests: List and filter repository pull requests
- create_pull_request_review: Create a review on a pull request
- merge_pull_request: Merge a pull request
- get_pull_request_files: Get the list of files changed in a pull request
- get_pull_request_status: Get the combined status of all status checks
- update_pull_request_branch: Update a PR branch with latest base branch changes
- get_pull_request_comments: Get the review comments on a pull request
- get_pull_request_reviews: Get the reviews on a pull request
This adds a custom `User-Agent` header to requests from the
GitHub server to the GitHub API, identifying the application,
the version and key information about the environment.
This aligns with the [recommendations][1] in the GitHub Docs.
As part of this change, I have also moved the current version of
the server into a constant, and fix the initialization of `Server`
to use that version, taking from `package.json`.
[1]: https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api?apiVersion=2022-11-28#user-agent
Adds functionality to fetch details of a specific GitHub issue by number.
This includes:
- New GetIssueSchema for input validation
- Implementation of getIssue function using GitHub API
- Addition of get_issue tool to available tools list
- Handler for get_issue in CallToolRequestSchema
This allows users to retrieve complete issue information including:
- Issue metadata (title, body, state)
- Associated data (labels, assignees, milestone)
- Timestamps (created, updated, closed)
- Implemented `listIssues`, `updateIssue`, and `addIssueComment` functions to manage GitHub issues.
- Introduced corresponding schemas: `ListIssuesOptionsSchema`, `UpdateIssueOptionsSchema`, and `IssueCommentSchema`.
- Updated server request handlers to support new functionalities.
- Enhanced README with documentation for new features.