Repository navigation
ci: migrate Biome configuration on Dependabot Biome updates - #246
Merged
Merged
Conversation
Signed-off-by: edbfi <326875205+edbfi@users.noreply.github.com>
There was a problem hiding this comment.
ℹ️ No critical issues and no inline findings; nothing to change.
Reviewed changes
Reviewed the single new file in full at 94308c3.
migratejob: runs unprivileged (contents: read,persist-credentials: false,bun ci --ignore-scripts). It runs only whenpackage.jsonhas a+/-line mentioning"@biomejs/biome", and it uploadsgit diff --binaryas a one-day artifact keyed by head SHA.applyjob: downloads that artifact and requires exactly one regular file namedbiome.patch. It then fetches the head SHA into a fresh repo and applies the patch to the index only, so PR code is never checked out or run.apply --summarymust be empty (no create, delete, rename or mode change). Every changed path must bebiome.jsonorbiome.jsoncwith mode100644. The job creates a commit on top ofHEAD_SHAand pushes it with--force-with-lease=refs/heads/$HEAD_REF:$HEAD_SHA, so a moved head cannot be overwritten. It also re-checks the live PR head before pushing.enablejob: turns on squash auto-merge pinned with--match-head-committo the new SHA. It uses the same retry and head-moved logic as the existingdependabot-auto-merge.yml.
I checked the workflow against the repo:
biome.jsonexists,@biomejs/biomeis2.5.15, andpackageManagerisbun@1.4.2.bun-version-file: package.jsontherefore resolves.- The
actions/checkoutandoven-sh/setup-bunSHAs match the ones inci.yml. - The
biomegroup in.github/dependabot.ymlcovers@biomejs/*. .pre-commit-config.yamlhas thebiome-migratehook that the PR body describes as layer 2.- Secret use is minimal.
BIOME_MIGRATE_TOKENis exposed only to the push step,DEPENDENCY_AUTOMERGE_TOKENonly toenable, and the top-levelpermissions: {}is respected. - The
[dependabot skip]commit message and thegithub.actor == 'dependabot[bot]'gate stop the workflow from looping on its own commit.
I could not run the workflow here, and I could not check the SHA-to-tag mapping for upload-artifact offline. The result rests on reading the code and on the pilot evidence in the PR body.
claude-sonnet-5-5 | 𝕏
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.

What
Adds
.github/workflows/biome-migrate.yml, a byte-identical copy of edbfi-ci'stemplates/biome-migrate.yml(D4 layer 3, S15). On a Dependabot PR that changes@biomejs/biome:migraterunsbiome migrate --write, unprivileged.applypushes onechore(deps): apply biome migrate [dependabot skip]commit, if the patch touches onlybiome.json/biome.jsonc, usingBIOME_MIGRATE_TOKEN.enableturns on auto-merge for the new head.Pilot evidence
End-to-end in edbfi/edbfi-ci-playground (#14 fixture, Biome 1.9.4 → 2.5.15):
biome-migratehook).migrate→applypushed7e672d5: onegithub-actions[bot]commit whose parent is the Dependabot head, changing onlybiome.json.enableturned on auto-merge. The migrated head went green and the PR merged itself.edbfi/portaler#126 carries the same file. This repo already has the
BIOME_MIGRATE_TOKENandDEPENDENCY_AUTOMERGE_TOKENDependabot secrets.Gates
bun install --frozen-lockfile, thenprek run --files .github/workflows/biome-migrate.yml(actionlint, zizmor, privileged-jobs): passed.Owner actions