From 3bd825a17e30ff9af510530ee94be52481373648 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Fri, 31 Oct 2025 09:52:49 -0500 Subject: [PATCH] feat: use autofix.ci to auto-update dist/ on all PRs (#308) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Switches from our custom GitHub Actions workflow to [autofix.ci](https://autofix.ci/) for automatically updating the `dist/` folder. This solves the CI triggering issue and works on all PRs, not just Renovate PRs. ## Problem Solved The previous workflow had a critical issue: commits made with `GITHUB_TOKEN` don't trigger other CI workflows (by design to prevent infinite loops). This meant that after the dist/ folder was updated, CI wouldn't run to verify the changes. ## Solution: autofix.ci autofix.ci uses a GitHub App token to make commits, which **does** trigger CI workflows. This ensures that: - ✅ CI tests run after dist/ is updated - ✅ Works on ALL PRs, not just Renovate - ✅ Renovate still recognizes and can rebase PRs (via `gitIgnoredAuthors`) ## Changes - **Renamed workflow**: `renovate-dist-update.yml` → `autofix.yml` - **Removed filters**: Now runs on all PRs (not just when specific files change) - **Removed Renovate check**: Works for all PR authors, not just renovate[bot] - **Switched to autofix.ci**: Replaced manual commit logic with autofix.ci action - **Updated permissions**: Changed from `write` to `read` (autofix.ci handles commits) - **Updated renovate.json**: Added `autofix.ci[bot]` to `gitIgnoredAuthors` ## Setup Required This PR requires installing the autofix.ci GitHub App: 👉 https://github.com/apps/autofix-ci ## Testing Once the app is installed, this workflow will automatically: 1. Run on every PR 2. Execute `npm run all` to rebuild dist/ 3. Let autofix.ci commit any changes 4. Trigger CI workflows to verify the changes 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- > [!NOTE] > Replaces the Renovate-only dist update workflow with an autofix.ci-based workflow that runs on all PRs and main pushes, and updates Renovate to ignore autofix.ci commits. > > - **CI**: > - Add `/.github/workflows/autofix.yml` to build (`npm run all`) and let `autofix.ci` commit fixes on PRs and `main` pushes. > - Remove `/.github/workflows/renovate-dist-update.yml` and its manual commit/push logic. > - **Renovate**: > - Update `/.github/renovate.json` to set `gitIgnoredAuthors` to `autofix.ci[bot] `. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 520b55f3f5045ef239900070ac87c66667338b09. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --------- Co-authored-by: Claude --- .github/workflows/autofix.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/autofix.yml diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 0000000..a387ba7 --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,33 @@ +name: autofix.ci + +on: + pull_request: + push: + branches: + - main + +permissions: + contents: read + +jobs: + autofix: + runs-on: ubuntu-latest + + steps: + - name: Checkout PR branch + uses: actions/checkout@v5 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '24' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build and package + run: npm run all + + - name: autofix.ci + uses: autofix-ci/action@v1