Skip to content

Commit 5e4e2a5

Browse files
authored
workflows/pr-receive: Ignore pull requests with 10 or more commits (#66320)
This will cause the auto-labeler not to run on pull requests with more than 10 commits. Usually larger pull requests like this are mistakes and we want to avoid generating an excessive amount of notifications. It may be possible for legitimate pull requests to have 10 or more commits from people pushing fixup commits to addresss review comments. However, these pull requests should already have the correct labels by the time they grow to 10 commits.
1 parent 00e794b commit 5e4e2a5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/pr-receive.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ permissions:
1010
jobs:
1111
pr-target:
1212
runs-on: ubuntu-latest
13-
if: github.repository == 'llvm/llvm-project'
13+
# Ignore PRs with more than 10 commits. Pull requests with a lot of
14+
# commits tend to be accidents usually when someone made a mistake while trying
15+
# to rebase. We want to ignore these pull requests to avoid excessive
16+
# notifications.
17+
if: github.repository == 'llvm/llvm-project' &&
18+
github.event.pull_request.commits < 10
1419
steps:
1520
- name: Store PR Information
1621
run: |

0 commit comments

Comments
 (0)