Skip to content

Commit

Permalink
Run pre-commit against all files if PR changes lint config (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
lkubb authored Sep 25, 2024
1 parent fab37b5 commit 3c3d911
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/get-changed-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ jobs:
deleted:
- deleted:
- '**'
pre-commit:
- added|modified|deleted:
- .pre-commit-hooks/**
- .pre-commit-config.y?(a)ml
- .pylintrc
- pyproject.toml
- name: Echo Changed Files Output
run: echo "${{ toJSON(steps.changed-files.outputs) }}"
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
pre-commit install --install-hooks
- name: Check ALL Files On Branch
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' || fromJSON(inputs.changed-files)['pre-commit'] == 'true'
run: |
pre-commit run --show-diff-on-failure --color=always --all-files
Expand Down

0 comments on commit 3c3d911

Please sign in to comment.