mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #44] [MERGED] fix(bump-callers): reuse one open PR per repo via a stable branch (BE-3882) #55
Labels
No labels
cursor-review-catalog-drift
groom
groom
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/github-workflows#55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/github-workflows/pull/44
Author: @mattmillerai
Created: 7/21/2026
Status: ✅ Merged
Merged: 7/21/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-3882-stable-bump-branch📝 Commits (3)
eec9b38fix(bump-callers): reuse one open PR per repo via a stable branch (BE-3882)92330d8fix(bump-callers): guard existing-PR lookup + fail loud on create error (BE-3882)f08a97efix(bump-callers): commit all of a repo's files onto one bump branch (BE-3896) (#45)📊 Changes
5 files changed (+465 additions, -71 deletions)
View changed files
📝
.github/bump-callers/README.md(+10 -4)📝
.github/bump-callers/bump-callers.sh(+229 -65)📝
.github/bump-callers/tests/test_bump_callers.sh(+204 -2)📝
.github/workflows/bump-agents-md-callers.yml(+11 -0)📝
.github/workflows/bump-cursor-review-callers.yml(+11 -0)📄 Description
ELI-5
When we update a shared workflow here, a bot goes to every repo that uses it and opens a PR to point at the new version. The bug: it named each PR's branch after the new version's ID, so every update opened a brand-new PR and left the old ones sitting open — a growing pile where you couldn't tell which pin was current.
Now the bot uses one fixed branch name per repo (
ci/bump-<tag>). On the next update it reuses that same branch — rebuilding it fresh from the repo's current main and refreshing the existing PR's diff/title/body — instead of opening another. So there's at most one open bump PR per repo per workflow at any time, always showing the latest pin.What changed
.github/bump-callers/bump-callers.sh(the one shared script behind both thebump-cursor-review-callersandbump-agents-md-callersfleets):BRANCH="ci/bump-${TAG}"(dropped the${SHORT}suffix). The SHA now lives only in the commit/title/body.PATCH-force it back to the tip if it already exists, then apply the single file-pin change. The PR diff is always a clean single "bump to @SHORT" commit — no accumulated stale commits, no drift if the caller's main moved.gh pr list --head "$BRANCH" --state opendecides: if a bump PR is already open,gh pr editrefreshes its title/body (they embed${SHORT}) — no second PR. If none is open (first bump, or the prior one merged/closed since last run),gh pr createopens a fresh single one.Acceptance criteria
--state opencheck falls through to create; a residual branch is force-reset first).bump-callers.sh, so it applies to both the cursor-review and agents-md dispatchers.Tests
bash .github/bump-callers/tests/test_bump_callers.sh+shellcheck -x— 33/33 pass. Added coverage for the new update-in-place path (open PR is edited, not re-opened) and asserted the create path does no edit when no PR is open. Theghstub gainedpr list/pr edit/PATCHhandling and aSTUB_OPEN_PRtoggle.Judgment calls / notes
ci/bump-*branch, so the only thing discarded is the prior bump commit — exactly what we're replacing. It does refresh an open PR's diff out from under any in-progress review, but that's the desired "update to latest SHA" behavior for an automated bump PR.--field force=truerelies on gh's typed--fieldform sending a JSON boolean (same--fieldform the script already uses); confirmed against the refsPATCHAPI.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.