From b280fdb0af0d20b0193945b7541ecffe818bc276 Mon Sep 17 00:00:00 2001 From: Chad Pritchett Date: Mon, 17 Nov 2025 02:47:25 -0600 Subject: [PATCH 1/6] fix(actions): replace black with trunk --- .github/workflows/black.yml | 40 ------------------------------------- .github/workflows/lint.yml | 39 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/black.yml create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml deleted file mode 100644 index c16e502..0000000 --- a/.github/workflows/black.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Code Formatting - -on: - push: - branches-ignore: - - main - pull_request: - types: - - opened - - ready_for_review - - reopened - -jobs: - ci: - runs-on: 'ubuntu-latest' - name: PR Formatter - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Install python - uses: actions/setup-python@v3 - with: - python-version: '3.9' - - - name: Format the code - uses: psf/black@stable - with: - options: "--check --diff" - src: "." - - - name: Check-in updated code - uses: EndBug/add-and-commit@v9 - with: - default_author: github_actions - committer_name: GitHub Actions - committer_email: actions@github.com - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..d49cd97 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,39 @@ +name: Trunk Code Quality + +on: + push: + branches-ignore: + - main + pull_request: + types: + - opened + - ready_for_review + - reopened + +jobs: + trunk-quality: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Install Trunk + run: | + curl -fsSL https://get.trunk.io -o- | bash + echo "$HOME/.trunk/bin" >> $GITHUB_PATH + + - name: Run Trunk Autofix + run: trunk fmt --write . + + - name: Trunk Code Review & Lint + run: trunk check + + # Optionally commit autofixes + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + committer_name: GitHub Actions + committer_email: actions@github.com + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 361230347b268dd3d90474fb350ab25ad1faef15 Mon Sep 17 00:00:00 2001 From: Chad Pritchett Date: Mon, 17 Nov 2025 02:49:08 -0600 Subject: [PATCH 2/6] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d49cd97..177991a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,7 +23,7 @@ jobs: echo "$HOME/.trunk/bin" >> $GITHUB_PATH - name: Run Trunk Autofix - run: trunk fmt --write . + run: trunk fmt . - name: Trunk Code Review & Lint run: trunk check From 73aa81d0cb52b9f12254b396e1adad4c71bfbc5c Mon Sep 17 00:00:00 2001 From: Chad Pritchett Date: Mon, 17 Nov 2025 02:50:40 -0600 Subject: [PATCH 3/6] Update .github/workflows/lint.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 177991a..246e3ab 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,5 +35,6 @@ jobs: default_author: github_actions committer_name: GitHub Actions committer_email: actions@github.com + message: 'Apply Trunk autofixes' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 724adc9f6e014d8e85f77d42b2c06a43694be82b Mon Sep 17 00:00:00 2001 From: Chad Pritchett Date: Mon, 17 Nov 2025 02:51:50 -0600 Subject: [PATCH 4/6] Update .github/workflows/lint.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 246e3ab..6c2f2f9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,6 +30,7 @@ jobs: # Optionally commit autofixes - name: Commit changes + if: success() uses: EndBug/add-and-commit@v9 with: default_author: github_actions From b128a1e599af3f41645e253a126db2f555759c48 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 17 Nov 2025 08:52:30 +0000 Subject: [PATCH 5/6] Initial plan From 68db8eeaea386d4a0e2b9caf5b2a62052a96893c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 17 Nov 2025 08:57:21 +0000 Subject: [PATCH 6/6] Replace manual Trunk installation with official trunk-io actions Co-authored-by: cpritchett <3866278+cpritchett@users.noreply.github.com> --- .github/workflows/lint.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6c2f2f9..4ab5d8a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,20 +13,21 @@ on: jobs: trunk-quality: runs-on: ubuntu-latest + permissions: + checks: write + contents: write steps: - name: Checkout repo uses: actions/checkout@v4 - name: Install Trunk - run: | - curl -fsSL https://get.trunk.io -o- | bash - echo "$HOME/.trunk/bin" >> $GITHUB_PATH + uses: trunk-io/trunk-action/setup@v1 - name: Run Trunk Autofix run: trunk fmt . - name: Trunk Code Review & Lint - run: trunk check + uses: trunk-io/trunk-action@v1 # Optionally commit autofixes - name: Commit changes