Skip to content

Commit 339b1a6

Browse files
CI: Run pre-commit gh action on only changed files (#39505)
Resolves : GH38862 Since pre-commit in comment-bot runs on all files, it's a bit slow. Running it only on diff should speed it up significantly.
1 parent 0b16fb3 commit 339b1a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/comment_bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Install-pre-commit
3030
run: python -m pip install --upgrade pre-commit
3131
- name: Run pre-commit
32-
run: pre-commit run --all-files || (exit 0)
32+
run: pre-commit run --from-ref=origin/master --to-ref=HEAD --all-files || (exit 0)
3333
- name: Commit results
3434
run: |
3535
git config user.name "$(git log -1 --pretty=format:%an)"

0 commit comments

Comments
 (0)