From ebdfdbb6c9837f0d5c1146927d5c1cc0fd97cbad Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 15 Feb 2026 06:42:00 +0000 Subject: [PATCH] ci: run ruff format and auto-commit instead of format check Co-authored-by: Ali Khokhar --- .github/workflows/tests.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9c2d22a5..f5299baf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,6 +9,8 @@ on: jobs: ci: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v4 @@ -29,5 +31,12 @@ jobs: - name: Type check run: uv run ty check - - name: Check formatting - run: uv run ruff format --check + - name: Format + run: uv run ruff format + + - name: Commit and push formatting changes + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add -A + git diff --staged --quiet || (git commit -m "style: apply ruff format" && git push)