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
Remove slash commands and recheck plumbing. GITHUB_TOKEN cannot apply
labels in a way that re-triggers required pull_request checks; UI label
changes fire labeled events and changelog-label-check reruns reliably.
Keep sticky reminder posting and removal on pull_request_target only.
Copy file name to clipboardExpand all lines: .github/pull_request_template.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,8 +29,8 @@
29
29
30
30
31
31
## Does this code need a note in the changelog?
32
-
<!--Comment `/needs-changelog` or `/no-changelog` on this PR (author or collaborator). Maintainers may also set those labels in the GitHub UI. -->
33
-
<!-- If `/needs-changelog`, add a release-note entry under `## Changelog` below. If `/no-changelog`, add a brief explanation there of why no release note is needed. Merge requires exactly one label — not changelog text in the description. -->
32
+
<!--Set the `needs-changelog` or `no-changelog` label on this PR in the GitHub labels panel. -->
33
+
<!-- If `needs-changelog`, add a release-note entry under `## Changelog` below. If `no-changelog`, add a brief explanation there of why no release note is needed. Merge requires exactly one label — not changelog text in the description. -->
- **`needs-changelog`** — user-facing change; add a release-note entry in the PR description (e.g. under a `## Changelog` section)
84
74
- **`no-changelog`** — no release note needed; please add a brief rationale in the PR description (e.g. under the changelog question in the PR template)
85
75
86
-
**PR author or collaborator:** comment on this PR with one of:
87
-
88
-
- `/needs-changelog`
89
-
- `/no-changelog`
90
-
91
-
Maintainers may also set `needs-changelog` or `no-changelog` in the GitHub UI.
76
+
Set **`needs-changelog`** or **`no-changelog`** on this PR in the GitHub labels panel (right sidebar). That re-runs the required **Changelog label validation** check automatically.
92
77
93
78
Merge is blocked only until one of these labels is set — release note or rationale text in the PR description is encouraged but not required to merge.
-f body="Only the PR author or a collaborator can use \`/${chosen}\` to set the changelog label."
153
-
exit 0
154
-
fi
155
-
156
-
if [[ "$chosen" == "needs-changelog" ]]; then
157
-
other=no-changelog
158
-
else
159
-
other=needs-changelog
160
-
fi
161
-
162
-
gh api -X POST "repos/${repo}/issues/${pr}/labels" -f "labels[]=${chosen}"
163
-
gh api -X DELETE "repos/${repo}/issues/${pr}/labels/${other}" --silent 2>/dev/null || true
164
-
165
-
if [[ "$chosen" == "needs-changelog" ]]; then
166
-
ack="Applied label \`needs-changelog\`. Please add a release-note entry in the PR description (e.g. under a \`## Changelog\` section). Merge is not blocked on this — only the label is required."
167
-
else
168
-
ack="Applied label \`no-changelog\`. Please add a brief note in the PR description explaining why a release note is not needed (e.g. under the changelog question in the PR template). Merge is not blocked on this — only the label is required."
169
-
fi
170
-
gh api "repos/${repo}/issues/${pr}/comments" -f "body=${ack}"
171
-
172
-
# Sticky removal must proceed even if the recheck below fails.
173
-
echo "applied=true" >> "$GITHUB_OUTPUT"
174
-
175
-
# GITHUB_TOKEN label changes do not re-trigger pull_request workflows; rerun the PR check (best-effort).
176
-
run_id=""
177
-
page=1
178
-
while [[ -z "${run_id}" && "${page}" -le 10 ]]; do
179
-
run_id="$(gh api "repos/${repo}/actions/workflows/changelog-label-check.yml/runs?per_page=100&page=${page}&event=pull_request" \
Copy file name to clipboardExpand all lines: .github/workflows/changelog-label-check.yml
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -48,14 +48,13 @@ jobs:
48
48
49
49
if [[ "$has_needs" == true && "$has_no" == true ]]; then
50
50
echo "::error::PR has both \`needs-changelog\` and \`no-changelog\` labels. Remove one so exactly one remains."
51
-
echo "::error::Comment on this PR with \`/needs-changelog\` or \`/no-changelog\` (PR author or collaborator), or edit labels in the GitHub UI."
51
+
echo "::error::Edit labels on this PR in the GitHub UI so only one changelog label remains."
52
52
exit 1
53
53
fi
54
54
55
55
if [[ "$has_needs" == false && "$has_no" == false ]]; then
56
56
echo "::error::PR is missing a changelog label. Add exactly one: \`needs-changelog\` or \`no-changelog\`."
57
-
echo "::error::Comment on this PR with \`/needs-changelog\` (user-facing change; add a release note in the PR description) or \`/no-changelog\` (no release note needed; add a brief rationale in the PR description)."
58
-
echo "::error::PR author and collaborators can use those slash commands; maintainers may also set labels in the GitHub UI."
57
+
echo "::error::Set \`needs-changelog\` (user-facing change; add a release note in the PR description) or \`no-changelog\` (no release note needed; add a brief rationale in the PR description) in the GitHub labels panel."
0 commit comments