Skip to content

Commit ddf9b76

Browse files
Updated .github/workflows/lint-python.yml NO_JIRA
1 parent 401314f commit ddf9b76

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/lint-python.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
name: Lint Python
33
on: # yamllint disable-line rule:truthy
4-
workflow_dispatch:
54
pull_request:
65
paths:
76
- '**/*.py'
@@ -18,12 +17,12 @@ jobs:
1817
steps:
1918
- uses: actions/checkout@v3
2019
with:
21-
fetch-depth: 2
20+
fetch-depth: 0
2221

2322
- name: Modified files
2423
id: file-changes
2524
run: |
26-
echo "changed-files=$(git diff --name-only -r HEAD^1 HEAD | grep '\.py' | tr '\n' ' ')" >> $GITHUB_OUTPUT
25+
echo "changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} | grep '\.py' | tr '\n' ' ')" >> $GITHUB_OUTPUT
2726
2827
- name: Check GitHub event type to determine reporter type
2928
run: |
@@ -43,6 +42,6 @@ jobs:
4342
with:
4443
fail_on_error: false
4544
filter_mode: diff_context
46-
level: warning
45+
level: error
4746
flake8_args: ${{ steps.file-changes.outputs.changed-files }}
4847
reporter: ${{ env.REVIEWDOG_REPORTER }}

0 commit comments

Comments
 (0)