You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/check-pull-request-labels.yaml
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ jobs:
56
56
'**This PR is blocked until:**\n' +
57
57
'1. The invalid labels are deleted, and\n' +
58
58
'2. A maintainer deletes this comment to unblock the PR\n\n' +
59
-
'**Note:** Simply removing labels from the pull request is not enough - a maintainer must remove the label and delete this comment to remove the block.\n\n' +
59
+
'**Note:** Simply removing labels from the pull request is not enough - a maintainer must delete this comment then remove the label to remove the block.\n\n' +
60
60
commentMarker
61
61
62
62
if (blockingComment) {
@@ -80,5 +80,9 @@ jobs:
80
80
}
81
81
if (blockingComment) {
82
82
// Block the PR by failing the workflow
83
-
core.setFailed(`PR blocked: Invalid labels detected: (${invalidLabels.join(', ')}). A maintainer must delete the blocking comment after fixing the labels to allow merging.`)
83
+
if (hasInvalidLabels) {
84
+
core.setFailed(`PR blocked: Invalid labels detected: (${invalidLabels.join(', ')}). A maintainer must delete the blocking comment after fixing the labels to allow merging.`)
85
+
} else {
86
+
core.setFailed(`PR blocked: A previous blocking comment still exists. A maintainer must delete it to allow merging.`)
0 commit comments