From c19add63a97b9de2a5fc9f7538c9d4ae3cb0ccb8 Mon Sep 17 00:00:00 2001 From: Mihir Vala <179564180+mihirvala-crestdata@users.noreply.github.com> Date: Wed, 15 Oct 2025 17:59:20 +0530 Subject: [PATCH 1/2] chore: update GitHub workflow permissions and add API URL environment variable --- .github/workflows/gemini-review.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gemini-review.yml b/.github/workflows/gemini-review.yml index c9adce80..5a2fb8c8 100644 --- a/.github/workflows/gemini-review.yml +++ b/.github/workflows/gemini-review.yml @@ -21,10 +21,11 @@ jobs: runs-on: 'ubuntu-latest' timeout-minutes: 20 permissions: - contents: 'read' + contents: 'write' id-token: 'write' issues: 'write' pull-requests: 'write' + packages: 'read' steps: - name: 'Checkout repository' uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 @@ -70,7 +71,8 @@ jobs: "submit_pending_pull_request_review" ], "env": { - "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}" + "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}", + "GITHUB_API_URL": "https://api.github.com" } } }, From 26d1d06a99ccb8eff0048c3da24677a54310d76d Mon Sep 17 00:00:00 2001 From: Mihir Vala <179564180+mihirvala-crestdata@users.noreply.github.com> Date: Wed, 15 Oct 2025 18:06:36 +0530 Subject: [PATCH 2/2] feat: enable direct command execution and add git/github shell commands to workflow --- .github/workflows/gemini-review.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gemini-review.yml b/.github/workflows/gemini-review.yml index 5a2fb8c8..78d1dd39 100644 --- a/.github/workflows/gemini-review.yml +++ b/.github/workflows/gemini-review.yml @@ -70,6 +70,7 @@ jobs: "get_pull_request", "submit_pending_pull_request_review" ], + "allowDirectCommandExecution": true, "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}", "GITHUB_API_URL": "https://api.github.com" @@ -85,8 +86,15 @@ jobs: "run_shell_command(tail)", "run_shell_command(ls)", "run_shell_command(find)", - "run_shell_command(pwd)" - ] + "run_shell_command(pwd)", + "run_shell_command(git)", + "run_shell_command(gh)", + "run_shell_command(env)", + "run_shell_command(mcp__github__get_pull_request_diff)", + "run_shell_command(mcp__github__get_pull_request_files)", + "run_shell_command(mcp__github__get_pull_request)" + ], + "disabled": [] } } prompt: |-