Skip to content

Commit 7b97069

Browse files
Merge pull request #3102 from AI-Hypercomputer:gemini_cli_fix
PiperOrigin-RevId: 866532079
2 parents 9a6ff81 + 6804d8d commit 7b97069

3 files changed

Lines changed: 13 additions & 11 deletions

File tree

.github/workflows/gemini-dispatch.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ jobs:
124124
id-token: 'write'
125125
issues: 'write'
126126
pull-requests: 'write'
127+
with:
128+
additional_context: '${{ needs.dispatch.outputs.additional_context }}'
127129
secrets: 'inherit'
128130

129131
invoke:

.github/workflows/gemini-invoke.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: 'Run Gemini CLI'
4242
# Trigger Gemini with context
4343
id: 'run_gemini'
44-
uses: 'google-github-actions/run-gemini-cli@v0' # ratchet:exclude
44+
uses: 'google-github-actions/run-gemini-cli@main'
4545
env:
4646
TITLE: '${{ github.event.pull_request.title || github.event.issue.title }}'
4747
DESCRIPTION: '${{ github.event.pull_request.body || github.event.issue.body }}'
@@ -63,7 +63,6 @@ jobs:
6363
google_api_key: '${{ secrets.GOOGLE_API_KEY }}'
6464
use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}'
6565
use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}'
66-
upload_artifacts: '${{ vars.UPLOAD_ARTIFACTS }}'
6766
workflow_name: 'gemini-invoke'
6867
settings: |-
6968
{

.github/workflows/gemini-review.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ jobs:
4545

4646
- name: 'Run Gemini pull request review'
4747
# reviews code with detailed set of instructions for the Gemini
48-
uses: 'google-github-actions/run-gemini-cli@v0'
48+
uses: 'google-github-actions/run-gemini-cli@main'
4949
id: 'gemini_pr_review'
5050
env:
5151
GITHUB_TOKEN: '${{ steps.mint_identity_token.outputs.token || secrets.GITHUB_TOKEN || github.token }}'
5252
ISSUE_TITLE: '${{ github.event.pull_request.title || github.event.issue.title }}'
5353
ISSUE_BODY: '${{ github.event.pull_request.body || github.event.issue.body }}'
5454
PULL_REQUEST_NUMBER: '${{ github.event.pull_request.number || github.event.issue.number }}'
5555
REPOSITORY: '${{ github.repository }}'
56+
ADDITIONAL_CONTEXT: '${{ inputs.additional_context }}'
5657
with:
5758
gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}'
5859
gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}'
@@ -65,6 +66,7 @@ jobs:
6566
google_api_key: '${{ secrets.GOOGLE_API_KEY }}'
6667
use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}'
6768
use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}'
69+
workflow_name: 'gemini-review'
6870
settings: |-
6971
{
7072
"model": {
@@ -83,13 +85,12 @@ jobs:
8385
"--rm",
8486
"-e",
8587
"GITHUB_PERSONAL_ACCESS_TOKEN",
86-
"ghcr.io/github/github-mcp-server:v0.18.0"
88+
"ghcr.io/github/github-mcp-server:v0.27.0"
8789
],
8890
"includeTools": [
8991
"add_comment_to_pending_review",
90-
"create_pending_pull_request_review",
9192
"pull_request_read",
92-
"submit_pending_pull_request_review"
93+
"pull_request_review_write"
9394
],
9495
"env": {
9596
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
@@ -98,11 +99,11 @@ jobs:
9899
},
99100
"tools": {
100101
"core": [
101-
"run_shell_command(cat)",
102-
"run_shell_command(echo)",
103-
"run_shell_command(grep)",
104-
"run_shell_command(head)",
105-
"run_shell_command(tail)"
102+
"run_shell_command(cat)",
103+
"run_shell_command(echo)",
104+
"run_shell_command(grep)",
105+
"run_shell_command(head)",
106+
"run_shell_command(tail)"
106107
]
107108
}
108109
}

0 commit comments

Comments
 (0)