Stop skipping Niall.chat as empty, and arm auto-merge on the bump PRs #29
No reviewers
Labels
No labels
brandkit-conformance
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grey.ooo/symfony-brand-kit!29
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/propagate-clone-and-automerge"
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?
Two findings from run #11 — the first
propagate.ymlrun that ever succeeded.1. Niall.chat was being skipped silently
The run reported
repo is empty — nothing to update. It isn't: 20 branches, 42MB, and acomposer.lockpinning this bundle toe915ac5("Make the sidebar optional") whilemainis1e24500. It is a live consumer, months behind, and this job has never offered it a bump.Root cause, reproduced by hand:
Its server-side git
HEADpoints at amasterthat has no commits, while the API reportsdefault_branch: main(fbae6531). A plain clone follows that symref and gets nothing. Theexisting code inferred emptiness from an unresolvable
HEAD, and the comment asserting "thereis no code in the repo yet" had gone stale.
Fixed by asking rather than inferring:
--branch "$default_branch"read from the APIemptyflag, nothing elseHEADis red — conflating "did not find out" with"nothing to do" is what hid this
Worth noting separately: Niall.chat's HEAD symref is itself misconfigured and will confuse
anyone cloning it by hand, not just this script. This PR routes around it; repointing HEAD to
mainon that repo is a separate fix I haven't made.2. Auto-merge, armed but never performed
Each PR is now asked to merge itself when its own CI goes green. This script never merges.
That needs enforcing rather than intending, because Forgejo doesn't separate the two: scheduled
merge is the ordinary merge endpoint with
merge_when_checks_succeedset, so the identicalcall against a PR whose checks have already passed merges it on the spot.
arm_automerge()refuses unless the head commit's checks are genuinely still
pending:Capability is checked in three parts rather than assumed, because a silent no-op here would be
indistinguishable from a working auto-merge: the repo's permitted merge styles, the presence and
state of checks, and the instance's response to the field itself.
None of those refusals is red — the PR is open and correct, and only a convenience is missing.
Verification
sh -nclean, locally and insidematthewbaggett/php-node:8.4merge,default-disallowed → falls back to
squash, none-allowed → refusesmerge/squash/rebase with
default_merge_style=merge, and the three PRs from run #11 have 9,10 and 8 pending checks — so consumer CI does run on these branches, which is both the
precondition auto-merge needs and confirmation of the real-PAT rationale
composer validatecleanbump.shcannot run locally withoutWRITE_PAT, soworkflow_dispatchgainsdry_runandautomergeinputs. A dry dispatch on this branch is how I'd verify it against the real estatebefore merging. A push-triggered run has no inputs and keeps today's behaviour.
Not done here
The three open bump PRs from run #11 (Someones.Computer #463, PrintShop #184, Projects #43) are
not armed — that would start auto-merging into production apps, which I'd want asked for
explicitly rather than inferred.