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 <miurahr@linux.com>

* chore: wip

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* chore: github actions jobs permissions

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* chore: ci: drop pylint from linter action

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

---------

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
Hiroshi Miura
2024-12-19 14:54:19 +09:00
committed by GitHub
parent 82385435c4
commit 1f1d9562c9
2 changed files with 10 additions and 2 deletions

View File

@@ -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 }}