chore: resync dist and fix auto-build gate (protected main)#90
Merged
Conversation
- rebuild dist/ so the bundled code matches the current package-lock (axios 1.18, form-data 4.0.6, undici 6.27) - check-dist: push the rebuilt dist/ on source branches only; main is a protected branch that rejects direct pushes, so the previous main-only gate made the job fail with "protected branch hook declined"
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.
Why
After merging the dependency PRs (axios, form-data, undici, dev-deps), two problems surfaced:
main'sdist/was stale — those PRs merged with the old, svg-brokencheck-dist, so the bundleddist/index.jsstill contained the previous axios/form-data/undici. Rebuildingdist/from the currentpackage-lock.jsonproduces a ~50KB diff.check-distwas failing onmain— the auto-build tried to push the rebuiltdist/directly tomain, which is a protected branch:GH006: Protected branch update failed ... protected branch hook declined.Changes
dist/so the committed bundle matches the locked dependencies.check-dist: the auto-build now pushes the rebuiltdist/only on source branches (github.ref != 'refs/heads/main'), never to protectedmain.mainis kept in sync via merged PRs (like this one). The earlier== maingate was backwards and caused the protected-branch push failure.Note
Runtime-dependency PRs that change
dist/get the rebuild committed to their branch bycheck-dist. Because that commit is pushed withGITHUB_TOKEN, it does not re-trigger the required checks, so native auto-merge will wait on those (dev-dep PRs that don't touchdist/auto-merge cleanly). Fully automating the runtime-dep case needs a deploy key / PAT / GitHub App token — separate decision.