name: changelog-draft # Drafts CHANGELOG_PENDING.md entries from Conventional Commit subjects on # every push to main. Deterministic -- regex-parses commit subjects only, # no LLM call, no network access. Buckets feat/fix/refactor/perf/security # into Added/Fixed/Changed; skips chore/ci/test/docs/style/merge commits and # anything mentioning internal infra hostnames/addresses. Never touches # CHANGELOG.md itself -- human review still required to fold an entry in. on: push: branches: [main] permissions: contents: write jobs: changelog-draft: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Draft pending changelog entry run: python3 .github/scripts/changelog-draft.py "${{ github.event.before }}" "${{ github.sha }}" - name: Commit draft if changed run: | if ! git diff --quiet CHANGELOG_PENDING.md 2>/dev/null; then git config user.name "changelog-bot" git config user.email "changelog-bot@context-x.org" git add CHANGELOG_PENDING.md git commit -m "chore(changelog): draft pending entries [skip ci]" git push origin HEAD:main else echo "No changelog-worthy commits in this push." fi