From cd6edbac666cab2821098928dda80432e4037f3d Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Thu, 19 Dec 2024 08:45:24 +0900 Subject: [PATCH] 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 --- .github/workflows/run-linter.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-linter.yml b/.github/workflows/run-linter.yml index 280cd1c0..c48be78c 100644 --- a/.github/workflows/run-linter.yml +++ b/.github/workflows/run-linter.yml @@ -2,6 +2,8 @@ name: Run linter on: pull_request: + branches: + - 'master' jobs: linter: @@ -24,8 +26,10 @@ jobs: pip install -U pip tox wheel setuptools coveralls coverage[toml] pip install .[check] - name: run reviewdog + permissions: + pull-requests: write run: | - ./bin/reviewdog -runners=flake8,mypy,pylint -reporter=github-pr-check -conf=.reviewdog.yml + ./bin/reviewdog -runners=flake8,mypy,pylint -reporter=github-pr-review -conf=.reviewdog.yml env: REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}