Skip to content

[Bug] run-gemini-cli@v0 fetches wrong PR even when correct repo and PR number provided #251

@eshwarvijay

Description

@eshwarvijay

TL;DR

Description

The google-github-actions/run-gemini-cli@v0 action is failing to fetch pull request data for the correct repository and PR number, instead trying fallback PRs (1–6) and returning 404 errors.

Reproduction Steps

  1. Use Gemini workflow on pull_request event, triggered for PR # in amber-ml/amber-ml.
  2. Workflow log shows:
    Then Gemini tries PRs 1 through 6 and finally says unable to proceed with the code review.

Expected behavior

Gemini should fetch and review the exact PR it was triggered for—no arbitrary probing of PRs 1–6.

Observed behavior

Gemini disregards correct PULL_REQUEST_NUMBER and REPOSITORY, instead attempting PRs 1–6, all of which fail with 404.

Action YAML

jobs:
gemini-code-review:
 runs-on: ...
 env:
   PULL_REQUEST_NUMBER: ${{ github.event.number }}
   REPOSITORY: ${{ github.repository }}
 steps:
   - uses: google-github-actions/run-gemini-cli@v0
     with:
       gemini_cli_version: ${{ vars.GEMINI_CLI_VERSION }}
       gemini_api_key: ${{ secrets.GEMINI_API }}
       use_vertex_ai: false
       use_gemini_code_assist: false
       settings: |
         { ... }
       prompt: |
         Review this PR...

Log output

Warning: Unexpected input(s) 'google_api_key', 'gemini_debug'
Error executing tool get_pull_request: ... pulls/<actual-number>: 404 Not Found
... retries PRs 1–6 with the same error

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/qualityTracks quality issuesarea/workflowskind/bugSomething isn't workingpriority/p1Important and should be addressed in the near term

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions