From b266912e614537f3d10317dec43e7633d92af744 Mon Sep 17 00:00:00 2001 From: Christian Gunderman Date: Fri, 1 May 2026 10:22:32 -0700 Subject: [PATCH] fix(bot): prevent publish job from creating PRs for rejected changes --- .github/workflows/gemini-cli-bot-brain.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gemini-cli-bot-brain.yml b/.github/workflows/gemini-cli-bot-brain.yml index 422f139577..a11aa3ee09 100644 --- a/.github/workflows/gemini-cli-bot-brain.yml +++ b/.github/workflows/gemini-cli-bot-brain.yml @@ -210,12 +210,12 @@ jobs: # Discard rejected changes git reset git checkout . - rm -f pr-description.md branch-name.txt pr-comment.md pr-number.txt issue-comment.md bot-changes.patch + rm -f pr-description.md branch-name.txt pr-comment.md pr-number.txt issue-comment.md bot-changes.patch rejected-changes.patch else echo "Max iterations reached. Failing." echo "[REJECTED]" > critique_result.txt # We still want to upload artifacts for debugging even if it failed. - git diff --staged > bot-changes.patch || true + git diff --staged > rejected-changes.patch || true break fi fi @@ -241,6 +241,7 @@ jobs: tools/gemini-cli-bot/lessons-learned.md tools/gemini-cli-bot/history/*.csv bot-changes.patch + rejected-changes.patch pr-description.md branch-name.txt pr-comment.md