Skip to content

Commit 879fbe9

Browse files
authored
fix: Adapt to GitHub MCP Tooling Consolidation (#354)
This pull request addresses recent workflow failures where the **Gemini CLI could not perform review tasks** due to **breaking changes** in the GitHub MCP server. These changes were introduced in the GitHub MCP server's latest release, which consolidated the `get_pull_request*` tools into a single `pull_request_read` with multiple methods. ### Key Changes and Fixes 1. **Dependency Pinning:** The Docker image for the GitHub MCP Server is now **pinned to a specific version (v0.18.0)** instead of using `latest`. This prevents unexpected disruptions from future upstream updates and ensures consistent action stability. 2. **Tool Reference Update:** Updates MCP tool references and associated prompts for the `review` and `invoke` workflows and examples. For full details on the upstream changes, see the GitHub MCP Server release notes: [v0.18.0 Release Notes](https://github.com/github/github-mcp-server/releases/tag/v0.18.0) Fixes #353
1 parent 8a30099 commit 879fbe9

File tree

7 files changed

+19
-29
lines changed

7 files changed

+19
-29
lines changed

.github/commands/gemini-invoke.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Begin every task by building a complete picture of the situation.
5050
- **Repository**: !{echo $REPOSITORY}
5151
- **Additional Context/Request**: !{echo $ADDITIONAL_CONTEXT}
5252
53-
2. **Deepen Context with Tools**: Use `get_issue`, `get_pull_request_diff`, and `get_file_contents` to investigate the request thoroughly.
53+
2. **Deepen Context with Tools**: Use `get_issue`, `pull_request_read.get_diff`, and `get_file_contents` to investigate the request thoroughly.
5454
5555
-----
5656

.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-invoke.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
"--rm",
8282
"-e",
8383
"GITHUB_PERSONAL_ACCESS_TOKEN",
84-
"ghcr.io/github/github-mcp-server"
84+
"ghcr.io/github/github-mcp-server:v0.18.0"
8585
],
8686
"includeTools": [
8787
"add_issue_comment",
@@ -90,10 +90,7 @@ jobs:
9090
"list_issues",
9191
"search_issues",
9292
"create_pull_request",
93-
"get_pull_request",
94-
"get_pull_request_comments",
95-
"get_pull_request_diff",
96-
"get_pull_request_files",
93+
"pull_request_read",
9794
"list_pull_requests",
9895
"search_pull_requests",
9996
"create_branch",

.github/workflows/gemini-issue-fixer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
"--rm",
7979
"-e",
8080
"GITHUB_PERSONAL_ACCESS_TOKEN",
81-
"ghcr.io/github/github-mcp-server"
81+
"ghcr.io/github/github-mcp-server:v0.18.0"
8282
],
8383
"env": {
8484
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"

.github/workflows/gemini-review.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,12 @@ jobs:
8383
"--rm",
8484
"-e",
8585
"GITHUB_PERSONAL_ACCESS_TOKEN",
86-
"ghcr.io/github/github-mcp-server"
86+
"ghcr.io/github/github-mcp-server:v0.18.0"
8787
],
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/gemini-assistant/gemini-invoke.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
"--rm",
8080
"-e",
8181
"GITHUB_PERSONAL_ACCESS_TOKEN",
82-
"ghcr.io/github/github-mcp-server"
82+
"ghcr.io/github/github-mcp-server:v0.18.0"
8383
],
8484
"includeTools": [
8585
"add_issue_comment",
@@ -88,10 +88,7 @@ jobs:
8888
"list_issues",
8989
"search_issues",
9090
"create_pull_request",
91-
"get_pull_request",
92-
"get_pull_request_comments",
93-
"get_pull_request_diff",
94-
"get_pull_request_files",
91+
"pull_request_read",
9592
"list_pull_requests",
9693
"search_pull_requests",
9794
"create_branch",
@@ -170,7 +167,7 @@ jobs:
170167
- **Repository**: ${{ env.REPOSITORY }}
171168
- **Additional Context/Request**: ${{ env.ADDITIONAL_CONTEXT }}
172169
173-
2. **Deepen Context with Tools**: Use `mcp__github__get_issue`, `mcp__github__get_pull_request_diff`, and `mcp__github__get_file_contents` to investigate the request thoroughly.
170+
2. **Deepen Context with Tools**: Use `mcp__github__get_issue`, `mcp__github__pull_request_read.get_diff`, and `mcp__github__get_file_contents` to investigate the request thoroughly.
174171
175172
-----
176173

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,12 @@ jobs:
8181
"--rm",
8282
"-e",
8383
"GITHUB_PERSONAL_ACCESS_TOKEN",
84-
"ghcr.io/github/github-mcp-server"
84+
"ghcr.io/github/github-mcp-server:v0.18.0"
8585
],
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)