Skip to content

Commit

Permalink
chore: give pr permission for reviewdog (#862)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* chore: wip

Signed-off-by: Hiroshi Miura <[email protected]>

* chore: github actions jobs permissions

Signed-off-by: Hiroshi Miura <[email protected]>

* chore: ci: drop pylint from linter action

Signed-off-by: Hiroshi Miura <[email protected]>

---------

Signed-off-by: Hiroshi Miura <[email protected]>
  • Loading branch information
miurahr authored Dec 19, 2024
1 parent 8238543 commit 1f1d956
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check tox tests, lint and types
name: Check tox tests

on:
push:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/run-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

Expand Down

0 comments on commit 1f1d956

Please sign in to comment.