From 1f1d9562c9e108a456dde6b918066df2d95c31cb Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Thu, 19 Dec 2024 14:54:19 +0900 Subject: [PATCH] chore: give pr permission for reviewdog (#862) * chore: give pr permission for reviewdog - Run linter the PR is against master branch - Run linter when pull-request triggered - Allow review dog to put review comment on PR Signed-off-by: Hiroshi Miura * chore: wip Signed-off-by: Hiroshi Miura * chore: github actions jobs permissions Signed-off-by: Hiroshi Miura * chore: ci: drop pylint from linter action Signed-off-by: Hiroshi Miura --------- Signed-off-by: Hiroshi Miura --- .github/workflows/check.yml | 2 +- .github/workflows/run-linter.yml | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 9e71a477..9ff3bc71 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -name: Check tox tests, lint and types +name: Check tox tests on: push: diff --git a/.github/workflows/run-linter.yml b/.github/workflows/run-linter.yml index c1207de1..e2348719 100644 --- a/.github/workflows/run-linter.yml +++ b/.github/workflows/run-linter.yml @@ -2,11 +2,19 @@ name: Run linter on: pull_request: + branches: + - master + types: + - opened + - synchronize + - reopened jobs: linter: name: Linter runs-on: ubuntu-24.04 + permissions: + pull-requests: write steps: - uses: actions/checkout@v4 - name: Setup python @@ -23,7 +31,7 @@ jobs: pip install .[check] - name: run reviewdog run: | - ./bin/reviewdog -runners=flake8,mypy -reporter=github-pr-check -conf=.reviewdog.yml + ./bin/reviewdog -runners=flake8,mypy -reporter=github-pr-review -conf=.reviewdog.yml env: REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}