Skip to content

chore: resync dist and fix auto-build gate (protected main)#90

Merged
JChrist merged 1 commit into
mainfrom
ci/resync-dist-and-fix-autobuild-gate
Jun 22, 2026
Merged

chore: resync dist and fix auto-build gate (protected main)#90
JChrist merged 1 commit into
mainfrom
ci/resync-dist-and-fix-autobuild-gate

Conversation

@JChrist

@JChrist JChrist commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Why

After merging the dependency PRs (axios, form-data, undici, dev-deps), two problems surfaced:

  1. main's dist/ was stale — those PRs merged with the old, svg-broken check-dist, so the bundled dist/index.js still contained the previous axios/form-data/undici. Rebuilding dist/ from the current package-lock.json produces a ~50KB diff.
  2. check-dist was failing on main — the auto-build tried to push the rebuilt dist/ directly to main, which is a protected branch: GH006: Protected branch update failed ... protected branch hook declined.

Changes

  • Rebuilt dist/ so the committed bundle matches the locked dependencies.
  • check-dist: the auto-build now pushes the rebuilt dist/ only on source branches (github.ref != 'refs/heads/main'), never to protected main. main is kept in sync via merged PRs (like this one). The earlier == main gate was backwards and caused the protected-branch push failure.

Note

Runtime-dependency PRs that change dist/ get the rebuild committed to their branch by check-dist. Because that commit is pushed with GITHUB_TOKEN, it does not re-trigger the required checks, so native auto-merge will wait on those (dev-dep PRs that don't touch dist/ auto-merge cleanly). Fully automating the runtime-dep case needs a deploy key / PAT / GitHub App token — separate decision.

- 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"
@JChrist JChrist merged commit c3b0a12 into main Jun 22, 2026
6 checks passed
@JChrist JChrist deleted the ci/resync-dist-and-fix-autobuild-gate branch June 22, 2026 12:25
Sign up for free to 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.

1 participant