summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2023-11-29 14:30:29 +0000
committerErik Johnston <erik@matrix.org>2023-11-29 14:31:24 +0000
commitd57ee06ab7157967cc4e1153e815ddf2b873eb39 (patch)
tree6b4698caaf1c95dd60356a5769b8f100dfedfb72
parentAdd a workflow to try and automatically fixup a PR (#16704) (diff)
downloadsynapse-github/erikj/gha_auto_fixup.tar.xz
-rw-r--r--.github/workflows/fix_lint.yaml39
1 files changed, 26 insertions, 13 deletions
diff --git a/.github/workflows/fix_lint.yaml b/.github/workflows/fix_lint.yaml
index f1e35fcd99..a4f365e429 100644
--- a/.github/workflows/fix_lint.yaml
+++ b/.github/workflows/fix_lint.yaml
@@ -7,23 +7,14 @@ on:
   workflow_dispatch:
 
 jobs:
-  fixup:
-    name: Fix up
+  fixup_lint:
+    name: Fix lint
     runs-on: ubuntu-latest
 
     steps:
       - name: Checkout repository
         uses: actions/checkout@v4
 
-      - name: Install Rust
-        uses: dtolnay/rust-toolchain@master
-        with:
-          # We use nightly so that `fmt` correctly groups together imports, and
-          # clippy correctly fixes up the benchmarks.
-          toolchain: nightly-2022-12-01
-          components: rustfmt
-      - uses: Swatinem/rust-cache@v2
-
       - name: Setup Poetry
         uses: matrix-org/setup-python-poetry@v1
         with:
@@ -41,12 +32,34 @@ jobs:
         continue-on-error: true
         run: poetry run ruff --fix .
 
+      - uses: reviewdog/action-suggester@v1
+        with:
+          tool_name: lint
+
+
+  fixup_rust:
+    name: Fix rust
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+
+      - name: Install Rust
+        uses: dtolnay/rust-toolchain@master
+        with:
+          # We use nightly so that `fmt` correctly groups together imports, and
+          # clippy correctly fixes up the benchmarks.
+          toolchain: nightly-2022-12-01
+          components: rustfmt, clippy
+      - uses: Swatinem/rust-cache@v2
+
       - run: cargo clippy --all-features --fix -- -D warnings
         continue-on-error: true
 
       - run: cargo fmt
         continue-on-error: true
 
-      - uses: stefanzweifel/git-auto-commit-action@v5
+      - uses: reviewdog/action-suggester@v1
         with:
-            commit_message: "Attempt to fix linting"
+          tool_name: rust