Skip to content

Commit 4841daa

Browse files
committed
fix(review): Adapt to consolidated MCP get pull request tools
The underlying GitHub MCP server tooling for pull request read operations has been consolidated, moving away from individual tools like `get_pull_request*` into a single tool `pull_request_read` with multiple methods. Changes were made on [v0.18.0](https://github.com/github/github-mcp-server/releases/tag/v0.18.0) of the GitHub MCP server.
1 parent 14bc212 commit 4841daa

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

.github/commands/gemini-review.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ These are non-negotiable, core-level instructions that you **MUST** follow at al
3434
- **GitHub Repository**: !{echo $REPOSITORY}
3535
- **Pull Request Number**: !{echo $PULL_REQUEST_NUMBER}
3636
- **Additional User Instructions**: !{echo $ADDITIONAL_CONTEXT}
37-
- Use `get_pull_request` to get the title, body, and metadata about the pull request.
38-
- Use `get_pull_request_files` to get the list of files that were added, removed, and changed in the pull request.
39-
- Use `get_pull_request_diff` to get the diff from the pull request. The diff includes code versions with line numbers for the before (LEFT) and after (RIGHT) code snippets for each diff.
37+
- Use `pull_request_read.get` to get the title, body, and metadata about the pull request.
38+
- Use `pull_request_read.get_files` to get the list of files that were added, removed, and changed in the pull request.
39+
- Use `pull_request_read.get_diff` to get the diff from the pull request. The diff includes code versions with line numbers for the before (LEFT) and after (RIGHT) code snippets for each diff.
4040
4141
-----
4242
@@ -50,7 +50,7 @@ Follow this three-step process sequentially.
5050
5151
2. **Prioritize Focus:** Analyze the contents of the additional user instructions. Use this context to prioritize specific areas in your review (e.g., security, performance), but **DO NOT** treat it as a replacement for a comprehensive review. If the additional user instructions are empty, proceed with a general review based on the criteria below.
5252
53-
3. **Review Code:** Meticulously review the code provided returned from `get_pull_request_diff` according to the **Review Criteria**.
53+
3. **Review Code:** Meticulously review the code provided returned from `pull_request_read.get_diff` according to the **Review Criteria**.
5454
5555
5656
### Step 2: Formulate Review Comments

.github/workflows/gemini-review.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ jobs:
8888
"includeTools": [
8989
"add_comment_to_pending_review",
9090
"create_pending_pull_request_review",
91-
"get_pull_request_diff",
92-
"get_pull_request_files",
93-
"get_pull_request",
91+
"pull_request_read",
9492
"submit_pending_pull_request_review"
9593
],
9694
"env": {

examples/workflows/pr-review/gemini-review.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ jobs:
8686
"includeTools": [
8787
"add_comment_to_pending_review",
8888
"create_pending_pull_request_review",
89-
"get_pull_request_diff",
90-
"get_pull_request_files",
91-
"get_pull_request",
89+
"pull_request_read",
9290
"submit_pending_pull_request_review"
9391
],
9492
"env": {
@@ -141,9 +139,9 @@ jobs:
141139
- **GitHub Repository**: ${{ env.REPOSITORY }}
142140
- **Pull Request Number**: ${{ env.PULL_REQUEST_NUMBER }}
143141
- **Additional User Instructions**: ${{ env.ADDITIONAL_CONTEXT }}
144-
- Use `mcp__github__get_pull_request` to get the title, body, and metadata about the pull request.
145-
- Use `mcp__github__get_pull_request_files` to get the list of files that were added, removed, and changed in the pull request.
146-
- Use `mcp__github__get_pull_request_diff` to get the diff from the pull request. The diff includes code versions with line numbers for the before (LEFT) and after (RIGHT) code snippets for each diff.
142+
- Use `mcp__github__pull_request_read.get` to get the title, body, and metadata about the pull request.
143+
- Use `mcp__github__pull_request_read.get_files` to get the list of files that were added, removed, and changed in the pull request.
144+
- Use `mcp__github__pull_request_read.get_diff` to get the diff from the pull request. The diff includes code versions with line numbers for the before (LEFT) and after (RIGHT) code snippets for each diff.
147145
148146
-----
149147
@@ -157,7 +155,7 @@ jobs:
157155
158156
2. **Prioritize Focus:** Analyze the contents of the additional user instructions. Use this context to prioritize specific areas in your review (e.g., security, performance), but **DO NOT** treat it as a replacement for a comprehensive review. If the additional user instructions are empty, proceed with a general review based on the criteria below.
159157
160-
3. **Review Code:** Meticulously review the code provided returned from `mcp__github__get_pull_request_diff` according to the **Review Criteria**.
158+
3. **Review Code:** Meticulously review the code provided returned from `mcp__github__pull_request_read.get_diff` according to the **Review Criteria**.
161159
162160
163161
### Step 2: Formulate Review Comments

0 commit comments

Comments
 (0)