Skip to content

AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary

Allow towncrier bootstrap CHANGELOG.md header in changelog-guard

Trevin Chowa50761a1f159
diff --git a/.github/workflows/changelog-guard.yml b/.github/workflows/changelog-guard.yml
index 5967ace1..1d7db9fb 100644
--- a/.github/workflows/changelog-guard.yml
+++ b/.github/workflows/changelog-guard.yml
@@ -61,6 +61,18 @@ jobs:
exit 0
fi
+ if [ "${changed_changelog}" -eq 1 ]; then
+ # One-time towncrier adoption: replacing ## [Unreleased] with the
+ # start marker / notice is allowed. Adding release-note bullets
+ # (+### sections) is not.
+ cl_diff="$(git diff "${BASE_SHA}...${HEAD_SHA}" -- CHANGELOG.md || true)"
+ if printf '%s\n' "${cl_diff}" | grep -q 'towncrier release notes start' \
+ && ! printf '%s\n' "${cl_diff}" | grep -qE '^\+### '; then
+ echo "Allowing towncrier bootstrap CHANGELOG.md header change."
+ changed_changelog=0
+ fi
+ fi
+
if [ "${changed_changelog}" -eq 1 ]; then
echo "::error::Do not edit CHANGELOG.md in feature PRs."
echo "Add changelog.d/<n>.<type>.md instead (see changelog.d/README.md)."