We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06a06ae commit 53a951bCopy full SHA for 53a951b
.github/workflows/pre-commit.yml
@@ -4,13 +4,18 @@
4
5
name: pre-commit
6
7
-on:
8
- pull_request:
9
- push:
10
- branches: [main]
+on: [push, pull_request]
11
12
jobs:
13
pre-commit:
+ # External pull requests should be checked, but not our own internal pull
+ # requests again, as these are already checked by the push on the branch.
+ # Without this if condition, the checks would be performed twice, as
14
+ # internal pull requests correspond to both the push and pull_request
15
+ # events.
16
+ if:
17
+ github.event_name == 'push' ||
18
+ github.event.pull_request.head.repo.full_name != github.repository
19
runs-on: ubuntu-latest
20
steps:
21
- uses: actions/checkout@v4
0 commit comments