Repository navigation
feat(workflows): gemini-review - #19
Merged
Merged
Conversation
…x commit Requesting the org team `gemini` on a PR runs run-gemini-cli twice as the marola-gemini-bot App: once to post a COMMENT review, once with file tools only to fix its own real, local findings. A plain step refuses changes under .github/ or to .git/config and hooks, runs the caller's check-command without the token, and pushes one commit. This repo calls it from gemini.yml. Bumps to v0.4.0. Refs marola-dev/marola#641 Tested: actionlint (all workflows) ok; bash tests/self-tests.sh all ok; docs-lint clean; agents-check ok Cost: ~$4 est. Co-Authored-By: Claude <noreply@anthropic.com>
h0ffmann
marked this pull request as ready for review
October 4, 2026 00:25
…-flash v0.1.9 ignored gemini_model, workflow_name and github_pr_number, so the CLI ran its default Pro model, which the free tier answered with 503s for three minutes on the first live run (#19). Tested: actionlint ok Cost: ~$0.5 est. Co-Authored-By: Claude <noreply@anthropic.com>
…m its answer The run-gemini-cli agent spent one request per tool step and hit the free tier's 20 requests a day per model on the first PR, after posting nothing. scripts/gemini_review.py now sends the numbered diff once, asks for JSON, posts one COMMENT review with suggestion blocks, and applies a fix only where its original text still matches, to files the PR changed, never under .github/. Tested: gemini_review.py --self-test ok; tests/self-tests.sh all ok; actionlint ok; ruff ok; docs-lint clean Cost: ~$2 est. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Gemini review
The PR introduces a reusable Gemini review workflow and its supporting Python script. However, the script attempts to query an invalid 'files' field from 'gh pr view --json', which will cause the workflow to fail. Additionally, the generated commit lacks the mandatory 'Co-Authored-By' trailer required by the repository's hard rules.
- fixed: scripts/gemini_review.py:274 — Since 'files' is no longer retrieved from 'gh pr view', populate the files list directly from the keys of the 'hunks' dictionary. - left: scripts/gemini_review.py:256 — the file no longer matches the finding Tested: bash tests/self-tests.sh ok Cost: $0 (Gemini API free tier)
Contributor
|
Gemini pushed b8621a1 with the fixes it was sure of; re-request
|
Gemini's review on #19 flagged the missing Co-Authored-By; the bot's commit was written by Gemini, so it names Gemini, and AGENTS.md records the exception. Tested: actionlint ok; agents-check ok Cost: ~$0.3 est. Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: marola-gemini-bot[bot] <337517965+marola-gemini-bot[bot]@users.noreply.github.com>
… original text Gemini's line numbers on #19 were two lines off, so committing its suggestion replaced the diff-size check instead of the gh call and broke the script (python-ci red on dbe9745). The review now moves a fix onto the one in-hunk place its original text appears, or drops the fix and keeps the comment. Restores the size check and keeps the title,body query. Tested: gemini_review.py --self-test ok (new anchor cases); tests/self-tests.sh all ok; ruff check + format ok Cost: ~$0.5 est. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
|
Gemini setup working now |
19 tasks
…w a repo opts in Tested: docs-lint clean Cost: ~$0.2 est. Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Oct 4, 2026
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Hoffmann · project thread
Summary: Before: requesting a review from the
geminiteam on a PR did nothing. After:marola-gemini-botposts a Gemini review, then pushes one commit fixing the findings it gave an exact fix for. This works on every repo that calls this workflow.gemini_review.py --self-test,tests/self-tests.sh, actionlint, ruff, docs-lint and agents-check all pass. Live on this PR: the bot reviewed it and pushed b8621a1What changed
scripts/gemini_review.py(stdlib,--self-test): one Gemini API call per review, because the free tier allows 20 requests a day per model and therun-gemini-cliagent used them all up on this PR. It sends the diff numbered by new-file line, plus.gemini/styleguide.mdandAGENTS.md, and asks for JSON. It keeps only the comments GitHub accepts and moves each suggestion onto the lines that really hold its original text, since Gemini's line numbers were two lines off here. Then it posts oneCOMMENTreview.fixapplies a fix only where the file still matches, only in files the PR changed, and never under.github/..github/workflows/gemini-review.yml(reusable): runs on a request for thegeminiteam. It removes the request, reviews, applies fixes, runscheck-commandwithout the token, and pushes as the App withTested:/Cost:/Co-Authored-By: Gemini..github/workflows/gemini.yml: this repo's own caller, withcheck-command: bash tests/self-tests.sh.AGENTS.md: the bot's fix commits name Gemini as co-author.docs/4-reference_workflows.mddocuments the workflow, the CHANGELOG has an entry, and every pin moves to v0.4.0.How: The org secrets
GEMINI_API_KEYandGEMINI_APP_PRIVATE_KEYand the variableGEMINI_APP_IDreach the workflow throughsecrets: inherit. Fork PRs are skipped. After merging, tagv0.4.0; each repo then gets agemini.ymlcaller in its own PR.Closes marola-dev/marola#641
Closes marola-dev/marola#546
https://claude.ai/code/session_01NYzPmf2qCK2s2RYccvBVBY