Commit graph

2 commits

Author SHA1 Message Date
ethernet
64389a2ce2
fix(ci): js-autofix pushes via PR instead of direct push to main (#65186)
* fix(js): never format package-lock.json

prettier and eslint should never touch package-lock.json. main has a
repo rule requiring team approval when lockfiles change, so an autofix
PR touching it would hang waiting for review.

- Add .prettierignore at repo root
- Add '**/package-lock.json' to eslint shared config ignores

* fix(ci): js-autofix pushes via PR instead of direct push to main

Main now has repository rules requiring pull requests + required status
checks ("All required checks pass"), so the workflow's direct push to
main is rejected with GH013 every time eslint --fix produces changes.

Switch apply-patch to push to a dedicated bot/js-autofix branch, create
or update a PR, and enable auto-merge (squash). The PR auto-merges once
CI passes. If CI fails or main moves, the PR is auto-closed and the
branch deleted — the next run re-applies on the current state.

The two-job security split is preserved:
- generate-patch stays unprivileged (contents: read only) — it runs npm
  on an ephemeral runner with zero push permissions.
- apply-patch (contents: write + pull-requests: write) still never runs
  npm, never installs anything, never executes repo code — it applies
  the trusted patch artifact and delivers it via PR.
2026-07-15 17:19:19 -04:00
ethernet
214cbf77f0 refactor(lint): hoist shared eslint + prettier config to root 2026-07-16 01:42:02 +05:30