promote: branch-create/delete guard to main (unblocks #1274 staging)#82
Merged
Conversation
On a branch-CREATION push the before-hash is all-zeros, and the range logic falls back to 'the last 50 commits', extracting and advancing every PR ref in them. A branch creation merges nothing — the commits are inherited from the source branch — so this mass-advances ~50 recent PRs' kanban items on every new branch. That makes cutting a new 'staging' branch (D8/#1274) corrupt the board, the same class as the default-branch-change incident. Guard the advance job with 'github.event.created != true && github.event.deleted != true'. A create/delete is not a deploy event. Prerequisite for #1274 (create staging in every repo) — must be on main before any staging branch is cut.
Contributor
Author
|
👋 Heads-up — Code review queue is at 40 / 30 Above the WIP limit. The team convention is to review existing PRs before opening new work. Open PRs currently in Code review (oldest first):
Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.) |
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.
Promotes the branch-create/delete guard (#81) to
main.This must be on
mainbefore anystagingbranch is cut for #1274 — the advance-deploy-env reusable is consumed@main, and without the guard, creating a staging branch mass-advances ~50 PRs per repo toFR on staging.Carries only the guard — #80 (column collapse) is still open, so the
On devcode is not included (that's a separate coordinated cutover). Merge with a merge commit.After this merges I can safely create the 8 staging branches (#1274).
Note
Low Risk
Single workflow guard on a non-deploy path; reduces incorrect automation with no change to merge/deploy advancement behavior.
Overview
Prevents accidental mass kanban updates when a tracked branch is created or deleted instead of receiving a normal merge push.
The
advancejob inadvance-deploy-env.ymlnow runs only whengithub.event.createdandgithub.event.deletedare not true. On create/delete,beforeis the zero hash and the workflow would otherwise scan the last ~50 commits and mark many PRs as FR on staging (or the branch’s mapped status)—a problem when cutting newstagingbranches for #1274.No change to how real deploy pushes resolve PRs or update project fields; only create/delete push events are skipped.
Reviewed by Cursor Bugbot for commit 67b204c. Bugbot is set up for automated code reviews on this repo. Configure here.