From 2424ea16ea0622d1972e8950aa88edbcfd5b58e3 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 7 Mar 2024 14:57:18 -0800 Subject: [PATCH] Use reviewdog rather than suggestion-bot to create suggestions. (#3752) --- .github/workflows/pre_commit_suggestions.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pre_commit_suggestions.yaml b/.github/workflows/pre_commit_suggestions.yaml index 038829dbc001..2a58ff472a9b 100644 --- a/.github/workflows/pre_commit_suggestions.yaml +++ b/.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