Преглед на файлове

Use reviewdog rather than suggestion-bot to create suggestions. (#3752)

Richard Smith преди 2 години
родител
ревизия
2424ea16ea
променени са 1 файла, в които са добавени 7 реда и са изтрити 3 реда
  1. 7 3
      .github/workflows/pre_commit_suggestions.yaml

+ 7 - 3
.github/workflows/pre_commit_suggestions.yaml

@@ -30,6 +30,10 @@ jobs:
       github.event.workflow_run.event == 'pull_request'
     runs-on: ubuntu-latest
     steps:
+      - uses: reviewdog/action-setup@v1
+        with:
+          reviewdog_version: latest
+
       - name: Download pre-commit output
         uses: actions/download-artifact@v4
         with:
@@ -37,11 +41,11 @@ jobs:
           github-token: ${{ secrets.GITHUB_TOKEN }}
           run-id: ${{ github.event.workflow_run.id }}
 
-      # Use https://github.com/tido64/suggestion-bot to create PR suggestions
+      # Use https://github.com/reviewdog/reviewdog to create PR suggestions
       # matching the diff that pre-commit created.
       - name: Create suggestions
         env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           GITHUB_EVENT_PATH=./event cat ./diff | \
-          npx suggestion-bot -f -m "pre-commit checks made changes to the following files:"
+          reviewdog -f=diff -f.diff.strip=1 -reporter=github-pr-review