Skip to content

Commit 6c79ac6

Browse files
committed
ci: fetch PR refs before scoped pre-commit
Made-with: Cursor
1 parent 97d38cb commit 6c79ac6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- name: Run pre-commit
3333
run: |
3434
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
35+
git fetch --no-tags origin "${{ github.event.pull_request.base.sha }}" "${{ github.event.pull_request.head.sha }}"
3536
pre-commit run --from-ref "${{ github.event.pull_request.base.sha }}" --to-ref "${{ github.event.pull_request.head.sha }}" --show-diff-on-failure
3637
else
3738
pre-commit run --all-files --show-diff-on-failure

0 commit comments

Comments
 (0)