We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 229411e commit 7b644afCopy full SHA for 7b644af
.github/workflows/pr-label-check.yml
@@ -15,7 +15,11 @@ jobs:
15
uses: actions/github-script@v6
16
with:
17
script: |
18
- const labels = context.payload.pull_request.labels;
+ if (context.eventName === 'push') {
19
+ console.log('Skipping label check for push event.');
20
+ return;
21
+ }
22
+ const labels = context.payload.pull_request?.labels || [];
23
if (labels.length === 0) {
24
throw new Error('This pull request must have at least one label.');
25
}
0 commit comments