Files
floci/.github/workflows/changelog-guard.yml
T
Hector Ventura cc6e96de69 chore(release): make CHANGELOG.md automation-owned (#2138)
* chore(release): make CHANGELOG.md automation-owned

Per ecosystem decision 0008:

- remove the hand-maintained [Unreleased] section (its entries are all
  represented by Conventional Commits since the last tag and appear in the
  next generated release section) and the stale [Unreleased] link reference
- new preamble stating the file is generated by semantic-release — a
  contributor's Conventional Commit message IS the changelog entry; historic
  Keep a Changelog sections remain below
- set changelogTitle in .releaserc.json so semantic-release inserts new
  release sections BELOW the preamble instead of prepending above the file
  title (observed live in the first automated release)
- new changelog-guard workflow: PRs touching CHANGELOG.md fail unless they
  carry the changelog-edit override label
- CONTRIBUTING: replace the retired release/x.y.x recipe with the Release
  Cut flow and the do-not-edit rule

* docs(contributing): finish retiring release-branch guidance

Review follow-up: the Release awareness / Branching Model sections still
described release/x.y.x branches as the stable lines, contradicting the
main-only Release Cut flow this PR documents. Releases are cut from main;
the release-branch row/claim is removed (reintroducible if maintenance
lines ever return).
2026-08-05 23:32:37 -05:00

26 lines
966 B
YAML

name: Changelog Guard
# CHANGELOG.md is generated by semantic-release (the Release Cut workflow) —
# a contributor's Conventional Commit message IS the changelog entry, so PRs
# must not edit the file by hand. Genuine corrections (typos in history,
# security notes) are allowed by adding the `changelog-edit` label to the PR.
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
paths:
- 'CHANGELOG.md'
permissions: {}
jobs:
guard:
name: CHANGELOG.md is generated
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'changelog-edit') }}
steps:
- name: Reject hand edits
run: |
echo "::error::CHANGELOG.md is generated by semantic-release — your Conventional Commit message is the changelog entry. Remove the CHANGELOG.md changes from this PR, or ask a maintainer for the 'changelog-edit' label if this is a genuine correction."
exit 1