Skip to content

Commit d2ef968

Browse files
authored
ci: add autofix.ci (#5)
## What this does Adds an `autofix.ci` workflow that runs the repo's checker in fix mode on every push to `main` and on pull requests, then uses the [autofix.ci](https://autofix.ci) app to push any resulting fixes back onto the PR branch. - Workflow `name` is exactly `autofix.ci` — the service identifies the workflow by name for security. - Fixer command: `vp check --fix` (the marimohub-style Vite+ fixer). Wrapped in `|| true` so unfixable lint findings never block uploading the fixes that did apply. - Setup + install steps mirror this repo's own `ci.yml`: `voidzero-dev/setup-vp` v0.2.4, Node version read from `.node-version`, `sfw: true`, `cache: true`, frozen-lockfile install. Everything is SHA-pinned with matching `# vX` comments. - `autofix-ci/action` runs last. The **autofix.ci GitHub App is installed org-wide** for marimo-team (confirmed by an org admin), so no per-repo app configuration is needed. ## Verification Cloned, `vp install --frozen-lockfile`, ran `vp check --fix`: formatting completed and no warnings/lint errors across 77 files — the tree is already clean, no diff. Workflow validated with `actionlint` (clean). No code changes in this PR — workflow only. Part of the marimo-team engineering-excellence initiative to standardize autofix across repos. Do not auto-merge.
1 parent b14098d commit d2ef968

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/autofix.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: autofix.ci # needed to securely identify the workflow
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
14+
15+
jobs:
16+
autofix:
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 15
19+
steps:
20+
- name: Check out repository
21+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
22+
23+
- name: Read Node.js version
24+
id: node-version
25+
run: echo "version=$(cat .node-version)" >> "$GITHUB_OUTPUT"
26+
27+
- name: Set up Vite+
28+
uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1
29+
with:
30+
version: 0.2.4
31+
node-version: ${{ steps.node-version.outputs.version }}
32+
sfw: true
33+
cache: true
34+
run-install: |
35+
- args: ['--frozen-lockfile']
36+
37+
# `vp check --fix` applies formatting/lint fixes. Unfixable lint errors
38+
# are CI's job to report; don't let them block uploading the fixes that
39+
# did apply.
40+
- run: vp check --fix || true
41+
42+
- uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a # v1.3.4

0 commit comments

Comments
 (0)