Skip to content

Commit b2c61a2

Browse files
authored
Enhance spammy PR check to include empty commits (#62920)
1 parent 78c347a commit b2c61a2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/check-for-spammy-pr.yml renamed to .github/workflows/check-for-spammy-prs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ jobs:
3535
});
3636
3737
const onlyDeletes = files.length > 0 && files.every(f => f.status === 'removed')
38+
const emptyCommit = !files.length
3839
const touchesTooMany = files.length > 10
3940
4041
// Close the PR and add the invalid label
41-
if (onlyDeletes || touchesTooMany) {
42+
if (onlyDeletes || emptyCommit || touchesTooMany) {
4243
await github.rest.issues.update({
4344
owner: owner,
4445
repo: repo,

0 commit comments

Comments
 (0)