fix(advance-deploy-env): skip branch create/delete (prerequisite for #1274 staging) - #81
Merged
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.) |
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 45941f3. Configure here.
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.
On a branch-creation push the before-hash is all-zeros → the range falls back to 'last 50 commits' → it advances ~50 recent PRs' kanban items. A branch creation merges nothing, so cutting a new
stagingbranch (D8/#1274) would mass-move ~50 items per repo toFR on staging— the same corruption class as the default-branch incident.Guards the advance job with
github.event.created != true && github.event.deleted != true.Must be on
mainbefore any staging branch is cut for #1274. Merge → promote to main → then create staging branches safely.Note
Low Risk
Single conditional on a CI workflow; reduces incorrect kanban updates with no change to deploy or application runtime behavior.
Overview
Adds a job-level guard on the reusable advance-deploy-env workflow so the
advancejob does not run when the push event is a branch creation or branch deletion (github.event.created/github.event.deleted).Without this, a new branch push still has
beforeas the all-zero hash, which triggers the existing “last 50 commits” fallback in the PR-extraction step and can bulk-update many kanban items even though no new work was merged—e.g. when cutting a newstagingbranch for #1274.Reviewed by Cursor Bugbot for commit 45941f3. Bugbot is set up for automated code reviews on this repo. Configure here.