Skip to content

Commit 20050bb

Browse files
subatoiCopilot
andauthored
Label PRs that only change an index.md file as invalid (#63776)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 27e9d2a commit 20050bb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎.github/workflows/check-for-spammy-prs.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
const onlyRenames = files.length > 0 && files.every(
5151
f => f.status === 'renamed' && f.additions === 0 && f.deletions === 0
5252
)
53+
const onlyIndexMd = files.length === 1 && files[0].filename.split('/').pop() === 'index.md'
5354
5455
if (
5556
targetsNonMain ||
@@ -58,7 +59,8 @@ jobs:
5859
isEmptyCommit ||
5960
touchesTooMany ||
6061
isBlankLineEdit ||
61-
onlyRenames
62+
onlyRenames ||
63+
onlyIndexMd
6264
) {
6365
await github.rest.issues.addLabels({
6466
owner,

0 commit comments

Comments
 (0)