Skip to content

Commit 33283bb

Browse files
committed
try this?
1 parent 1f8ea43 commit 33283bb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/check-format.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ permissions:
1414

1515
jobs:
1616
check:
17-
# Only run on PRs if the source branch is on someone else's repo
18-
if: "${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}"
1917
runs-on: ubuntu-latest
2018
steps:
2119
- name: "setup"
@@ -31,7 +29,12 @@ jobs:
3129
env:
3230
REVIEWDOG_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
3331
run: |
34-
poetry run ruff format --diff | reviewdog -reporter=github-check -f=diff -f.diff.strip=0 -name=ruff-format -filter-mode=nofilter -fail-on-error
32+
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
33+
REPORTER="github-pr-review"
34+
else
35+
REPORTER="github-check"
36+
fi
37+
poetry run ruff format --diff | reviewdog -reporter=github-pr-revi -f=diff -f.diff.strip=0 -name=ruff-format -filter-mode=nofilter -fail-level=error
3538
- name: "run ruff / check"
3639
if: "${{ always() && steps.install.conclusion == 'success' }}"
3740
run: "poetry run ruff check --output-format=github"

0 commit comments

Comments
 (0)