Skip to content

Commit 7b644af

Browse files
committed
Adjusted pr label check
1 parent 229411e commit 7b644af

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/pr-label-check.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ jobs:
1515
uses: actions/github-script@v6
1616
with:
1717
script: |
18-
const labels = context.payload.pull_request.labels;
18+
if (context.eventName === 'push') {
19+
console.log('Skipping label check for push event.');
20+
return;
21+
}
22+
const labels = context.payload.pull_request?.labels || [];
1923
if (labels.length === 0) {
2024
throw new Error('This pull request must have at least one label.');
2125
}

0 commit comments

Comments
 (0)