Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Closes #
Required for release automation.
Format: Keep a Changelog.
Categories: Added, Changed, Fixed, Removed.
User-facing notes only. Internal-only PRs (rare) may use the skip-changelog label.
User-facing notes only. Internal-only PRs (rare) may use `meta:no-changelog`.
Example:
### Changed
- Switched to action/cache@v3 for build speedup. (Relates to #789)
Expand Down Expand Up @@ -55,7 +55,8 @@ Example:
-->

<!--
If no user-facing changelog entry is needed, apply the skip-changelog label to this PR.
If no user-facing changelog entry is needed, apply `meta:no-changelog` to this PR.
Do not apply `meta:no-changelog` to `type:feature`, `type:bug`, `type:performance`, `type:security`, `type:release`, or `type:hotfix`.
-->

---
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/changelog-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ jobs:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
if echo "${PR_LABELS}" | grep -q '"meta:needs-changelog"' && echo "${PR_LABELS}" | grep -q '"meta:no-changelog"'; then
echo "::error::PR cannot include both meta:needs-changelog and meta:no-changelog."
exit 1
fi
Comment on lines +36 to +39
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clear stale needs-changelog before failing skip-labelled PRs

This new failure path blocks the normal internal-only PR flow after automation has run: the labeling workflow triggers on PR open/labeled and scripts/agents/labeling.agent.js auto-adds meta:needs-changelog whenever a PR initially has no changelog label, but there is no corresponding cleanup when a maintainer later adds meta:no-changelog. In that common sequence the PR now has both labels and this workflow fails until someone manually removes the stale auto-added label, so the guardrail should either remove/ignore the stale label when meta:no-changelog is present or the labeling agent should enforce the mutual exclusion.

Useful? React with 👍 / 👎.


if echo "${PR_LABELS}" | grep -q '"meta:no-changelog"' && echo "${PR_LABELS}" | grep -Eq '"type:(feature|bug|performance|security|release|hotfix)"'; then
echo "::error::meta:no-changelog is not allowed for type:feature, type:bug, type:performance, type:security, type:release, or type:hotfix."
exit 1
fi

if git diff --name-only "${BASE_SHA}" "${HEAD_SHA}" | grep -q "^CHANGELOG.md$"; then
echo "CHANGELOG.md updated in PR diff."
echo "run_validation=true" >> "$GITHUB_OUTPUT"
Expand Down
4 changes: 3 additions & 1 deletion docs/AUTOMATION_GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,14 @@ Opt-outs: use `<!-- meta: off -->` (legacy `<!-- branding: off -->`) for body-le

- Deprecated or removed features.

<!-- If no changelog entry is needed (internal-only), apply the skip-changelog label. -->
<!-- If no changelog entry is needed (internal-only), apply meta:no-changelog. -->
```

**Guidelines:**

- Changelog entries are for end-users, not just developers.
- `meta:needs-changelog` and `meta:no-changelog` are mutually exclusive.
- `meta:no-changelog` is allowed only for internal-only work and must not be used on feature, bugfix, performance, security, release, or hotfix PRs.
- The release agent extracts changelog notes from PR bodies and labels automatically.

**Release Triggers:**
Expand Down
5 changes: 4 additions & 1 deletion docs/PR_LABELS.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ Every PR should use a standard branch prefix for correct label and template auto

## Release & Changelog Process

- All PRs affecting user-facing features/fixes must include a valid changelog label; if missing, the agent will add `meta:needs-changelog`.
- Changelog labels are mutually exclusive: never apply both `meta:needs-changelog` and `meta:no-changelog`.
- Use `meta:no-changelog` only for internal-only changes (for example docs, refactor, chore, or test work with no user-facing impact).
- Do not use `meta:no-changelog` on `type:feature`, `type:bug`, `type:performance`, `type:security`, `type:release`, or `type:hotfix` PRs.
- PRs affecting user-facing features/fixes must carry changelog content and should not use `meta:no-changelog`.
- Only one `status:*` and one `release:*` label per PR.
- See [labels.yml](../.github/labels.yml) for the current canonical options.

Expand Down
Loading