Commit 1176517
authored
ci: add autofix.ci (#157)
## What this does
Adds an `autofix.ci` workflow that automatically **pushes** lint fixes
onto pull requests. When a contributor opens or updates a PR, the
workflow runs the repo's mutating fixer (`pnpm run lint`, i.e. `oxlint
--fix`) and, via the [autofix.ci](https://autofix.ci) GitHub App,
commits any resulting fixes straight back onto the PR branch.
Contributors never see a red lint check they have to reproduce and fix
by hand.
The autofix.ci GitHub App is **installed org-wide** for marimo-team
(confirmed by an org admin), so this works as soon as it merges — no
per-repo setup required.
## How it composes with the existing lint gate
CI's `oxlint` lint step stays exactly as-is: it's non-mutating and still
fails the build on anything that can't be auto-fixed (genuine lint
errors are meant to be surfaced, not silently rewritten). autofix.ci is
the complement — it handles the *mechanical* fixes (safe lint autofixes)
so that class of failure disappears from the contributor's plate. The
fixer step is guarded with `|| true` so unfixable lint errors don't
block uploading the fixes that *did* apply; CI remains the source of
truth for reporting them.
The setup steps (checkout / pnpm / Node) mirror `test.yml` exactly, with
the same SHA-pinned action versions.
## Verification
- Cloned, `pnpm install --ignore-scripts --frozen-lockfile`, ran `pnpm
run lint` → **no diff** (tree stays clean; only a pre-existing
non-fixable warning, which CI already reports).
- Workflow YAML parses cleanly and passes `actionlint`.
- Workflow `name` is exactly `autofix.ci` (required — the service
identifies the workflow by name for security) and the
`autofix-ci/action` step runs last.
Part of the marimo-team engineering-excellence initiative.1 parent 7481621 commit 1176517
1 file changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments