Skip to content

ci: auto-sync bun.lock on Dependabot PRs - #190

Merged
arzafran merged 2 commits into
mainfrom
fix/dependabot-bun-lockfile
Jun 4, 2026
Merged

ci: auto-sync bun.lock on Dependabot PRs#190
arzafran merged 2 commits into
mainfrom
fix/dependabot-bun-lockfile

Conversation

@arzafran

@arzafran arzafran commented Jun 4, 2026

Copy link
Copy Markdown
Member

What this does

Every Dependabot PR fails CI with lockfile had changes, but lockfile is frozen — Dependabot bumps package.json but never updates bun.lock, and Test installs --frozen-lockfile. Since auto-merge gates on Test passing, no Dependabot PR can merge without a manual lockfile fix. This adds a workflow that regenerates bun.lock on Dependabot PRs and commits it back, so the bump passes CI and lands the correct lockfile on main.

Approach (PAT, no pull_request_target)

  • Normal pull_request workflow, scoped to dependabot[bot].
  • Pushes the synced bun.lock using a PAT, because (a) Dependabot pull_request runs get a read-only GITHUB_TOKEN that can't push, and (b) a GITHUB_TOKEN push wouldn't retrigger Test — so auto-merge would never fire. A PAT push has write access and retriggers Test → fully hands-off auto-merge.
  • Staying on pull_request (not pull_request_target) keeps it off CodeQL's privileged-checkout radar (the previous revision failed CodeQL for exactly that).
  • Installs with --ignore-scripts; no-ops gracefully (with a warning, not a failure) until the secret is configured.

⚠️ One-time setup required

Create a fine-grained PAT scoped to this repo with Contents: Read and write, then add it under Settings → Secrets and variables → Dependabot (the Dependabot secrets store, not Actions) as DEPENDABOT_PAT. Dependabot-triggered runs can only read Dependabot secrets.

Test Plan

  • Add DEPENDABOT_PAT, then confirm the next Dependabot PR auto-syncs bun.lock, Test goes green, and auto-merge fires
  • CodeQL passes (no pull_request_target)
  • Non-Dependabot PRs unaffected (job gated on dependabot[bot])
  • No-ops without the secret (warns, doesn't fail)

Dependabot bumps package.json but not bun.lock, so Test's frozen install
fails on every Dependabot PR and automerge never fires. Add a
pull_request_target workflow (scoped to dependabot[bot], --ignore-scripts)
that regenerates bun.lock and commits it back to the PR branch.
Comment thread .github/workflows/dependabot-lockfile.yml Fixed
arzafran added a commit that referenced this pull request Jun 4, 2026
Bring docs in line with main as it stands now (post-marketing-removal,
post-useReveal) and apply the CSS-vs-JS animation philosophy consistently:

- components/effects/README: rewrite — drop deleted split-text/animated-gradient/
  liquid-drip; document only gsap.tsx + progress-text; point reveals at useReveal.
- components/README, app/README: remove stale effect imports/rows + the
  (marketing) tree refs and cleanup command.
- lib/hooks/README: add useReveal (row + example); fix useMediaQuery import
  (from hamo); replace the framer-motion reduced-motion example with a CSS one.
- ARCHITECTURE: trim sections that duplicate AGENTS.md to pointers; add an
  Animation summary. lib/styles + lib/utils READMEs: note the global.css
  [data-reveal] contract and the spring()→CSS linear() steer.
- CHANGELOG: [Unreleased] entries for #188 / #189 / #190.

Supersedes the in-flight docs/* branches; README/PROD-README left untouched
(website-facing OSS shape preserved).
Replaces the pull_request_target approach (which CodeQL flagged as a
privileged checkout) with a normal pull_request workflow that pushes the
regenerated bun.lock using a PAT. The PAT push retriggers Test, so automerge
fires hands-off. No-ops gracefully until DEPENDABOT_PAT is set.
@arzafran
arzafran merged commit d1dcb28 into main Jun 4, 2026
7 checks passed
@arzafran
arzafran deleted the fix/dependabot-bun-lockfile branch June 4, 2026 20:07
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.

2 participants