Skip to content

ci: adopt the canonical dependabot auto-merge reusable - #448

Merged
forkwright merged 1 commit into
mainfrom
ci/371-adopt-canonical-dependabot-reusable
Aug 21, 2026
Merged

ci: adopt the canonical dependabot auto-merge reusable#448
forkwright merged 1 commit into
mainfrom
ci/371-adopt-canonical-dependabot-reusable

Conversation

@forkwright

Copy link
Copy Markdown
Owner

Closes#371

Replaces 55 lines of locally-copied auto-merge logic with a pinned call to the canonical reusable in
forkwright/.github.

The copy is how this repo's version drifted. It kept exit 0 on the refusal path long after the
canonical workflow had corrected it to exit 1 — so the guard printed "refusing auto-merge" and then
merged, because Actions skips a later step only when an earlier one fails. #372 fixed that
instance; this removes the copy that produced it, which is what the issue actually asked for.

Why this was blocked, and why it no longer is

The reusable used to match the osv check by exact suffix, testing for names ending in osv scanner
or osv-scan. This repo's job is named osv-scanner, which ends with neither — so adopting then
would have made auto-merge refuse every PR whose osv check had reported and passed.

forkwright/.github#38 replaced that with normalisation: strip every non-alphanumeric, lowercase, test
containment. All four tokens the reusable requires resolve here:

required tokenthis repo's checknormalised
gateattestation / gategategate / gategategate
cargodenycargo denycargodeny
cargoauditcargo auditcargoaudit
osvscanosv-scannerosvscanner contains it ✓

Those four are exactly the required contexts on main plus the gate, so the reusable is checking the
same set branch protection does — with the addition it was adopted for: it verifies the checks
reported at all, which branch protection cannot, since a required check that silently never
reports is not a failure it can see.

Two deliberate differences from gate-attestation.yml

Both are commented inline, because both look like inconsistencies and neither is.

This caller declares concurrency; gate-attestation.yml deliberately does not. The difference
is in the reusables. hybrid-gate.yml declares its own group, so a caller-level duplicate
self-cancels it. This one declares none — so without a caller-level block, a superseded push to a
dependabot PR leaves the earlier run racing the newer one, both waiting on checks and both able to
merge.

This caller does not pass secrets: inherit; gate-attestation.yml does. That keyword forwards
every repository secret to a workflow in another repository. This reusable reads
secrets.GITHUB_TOKEN and nothing else, which a called workflow receives regardless — so inheriting
would widen the blast radius of a change in forkwright/.github for no capability gained.

Verification

pre-push-verify.sh derives the crates a branch touches from its diff; this branch touches none, so
there is nothing for it to build. The verification that matters here is GitHub resolving the uses:
ref and the reusable's own jobs reporting, which only CI can do. The YAML was parsed locally to rule
out a malformed file before pushing.

The refusal path itself is exercised by the next dependabot PR rather than by this one — this PR is
not authored by dependabot[bot], so the job's if: correctly skips it. Worth watching the first
dependabot bump after this lands to confirm the guard fails rather than skips on a red check.

Replaces 55 lines of locally-copied auto-merge logic with a pinned call to
forkwright/.github's reusable. The copy is how this repo's version drifted:
it kept `exit 0` on the refusal path long after the canonical workflow had
corrected it to `exit 1`, so the guard printed "refusing auto-merge" and then
merged. #372 fixed that instance; this removes the copy that produced it.
Adoption was blocked until forkwright/.github#38: the reusable matched osv by
exact suffix, and this repo's job is named `osv-scanner`, which matched
neither spelling it tested for — adopting then would have refused every PR
whose osv check had reported and passed. That is fixed. The reusable now
normalises check names to lowercase alphanumerics and tests containment, and
all four tokens it requires resolve here: `gate / gate` to gategate,
`cargo deny` to cargodeny, `cargo audit` to cargoaudit, and `osv-scanner` to
osvscanner, which contains osvscan.
The caller keeps two things the reusable does not supply, and both are
recorded inline because both look like inconsistencies with
gate-attestation.yml and are not.
It declares a concurrency block, which gate-attestation.yml deliberately
omits. The difference is in the reusables: hybrid-gate.yml declares its own
group, so a caller-level duplicate self-cancels it; this one declares none, so
without a caller-level block a superseded push to a dependabot PR leaves the
earlier run racing the newer one, both waiting on checks and both able to
merge.
It does not pass `secrets: inherit`, which gate-attestation.yml does. That
keyword forwards every repository secret to a workflow in another repository,
and this reusable reads `secrets.GITHUB_TOKEN` and nothing else — which a
called workflow receives regardless. Inheriting would widen the blast radius
of a change in forkwright/.github for no capability gained.
Closes#371
@forkwright
forkwright merged commit d593f87 into mainAug 21, 2026
8 checks passed
@forkwright
forkwright deleted the ci/371-adopt-canonical-dependabot-reusable branch August 21, 2026 08:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: replace the local dependabot guard with the canonical reusable workflow

1 participant

@forkwright