-
Notifications
You must be signed in to change notification settings - Fork 73
Drive releases from CHANGELOG.md with towncrier (ENG-10965) #498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,74 @@ | ||||||
| # Generated by reflex-release; do not edit by hand. | ||||||
| # Re-run `uvx reflex-release@0.1.0a2 sync` after changing [tool.reflex-release] in | ||||||
| # pyproject.toml. `uvx reflex-release@0.1.0a2 sync --check` fails when this file drifts. | ||||||
| name: changelog | ||||||
|
|
||||||
| # Two guards on every pull request: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: The workflow's header comment says "Two guards on every pull request" but the list below it contains three numbered guards (reject version headings, check news fragments, sync --check drift). The count is stale from before the sync --check step was added. Correct the count to "Three guards" (or fold the wording) so the documentation matches the steps. Prompt for AI agents
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct — the count is stale, and it is stale upstream: this file is Fixing it here would fork a generated workflow over a comment, and Collected as upstream follow-up in Generated by Claude Code |
||||||
| # | ||||||
| # 1. New CHANGELOG.md version headings are rejected. A merged version heading | ||||||
| # without a git tag is a real publish trigger (see | ||||||
| # release_from_changelog.yml), so headings must come from the Dispatch | ||||||
| # release workflow's release/* branches — not from hand edits. | ||||||
| # The guard uses the same parser the release pipeline publishes from, so the | ||||||
| # two cannot disagree. Escape hatch for deliberate restructuring of | ||||||
| # already-published sections: the 'changelog-version-edit' label. | ||||||
| # | ||||||
| # 2. Every package whose source the PR touches must add a news fragment under | ||||||
| # its news/ directory. Waive with the 'skip-changelog' label for changes | ||||||
| # that are genuinely not user-facing. | ||||||
| # | ||||||
| # 3. The generated release workflows must match what the pinned reflex-release | ||||||
| # version produces from [tool.reflex-release] — adding a package or editing | ||||||
| # the configuration without re-running `uvx reflex-release@0.1.0a2 sync` fails here rather than | ||||||
| # at release time. | ||||||
|
|
||||||
| permissions: | ||||||
| contents: read | ||||||
|
|
||||||
| concurrency: | ||||||
| group: ${{ github.workflow }}-${{ github.event.pull_request.id }} | ||||||
| cancel-in-progress: true | ||||||
|
|
||||||
| # The branches are the ones release_from_changelog publishes from: a merged | ||||||
| # version heading is a publish trigger wherever it lands, and r/hotfix/** | ||||||
| # publishes final versions without going through main at all. | ||||||
| on: | ||||||
| pull_request: | ||||||
| branches: | ||||||
| ["main", "r/pre-**", "r/hotfix/**"] | ||||||
|
|
||||||
| jobs: | ||||||
| changelog: | ||||||
| runs-on: ubuntu-latest | ||||||
| timeout-minutes: 10 | ||||||
| steps: | ||||||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||||||
| with: | ||||||
| fetch-depth: 0 | ||||||
| persist-credentials: false | ||||||
| - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | ||||||
| # The heading guard runs even for skip-changelog PRs: that label only | ||||||
| # waives the news-fragment requirement, not the publish-trigger guard. | ||||||
| # | ||||||
| # The exemption for release branches also requires the pull request to be | ||||||
| # authored by github-actions[bot], which is how the Dispatch release | ||||||
| # workflow opens it. A branch name is attacker-selectable; the author is | ||||||
| # not, so a contributor cannot skip the guard by naming their branch | ||||||
| # release/something and hand-writing a version heading. The | ||||||
| # 'changelog-version-edit' label needs triage rights to apply, so it is a | ||||||
| # sound escape hatch on its own. | ||||||
| - name: Reject manual changelog version headings | ||||||
| if: >- | ||||||
| ${{ !contains(github.event.pull_request.labels.*.name, 'changelog-version-edit') | ||||||
| && !(startsWith(github.head_ref, 'release/') | ||||||
| && github.event.pull_request.user.login == 'github-actions[bot]') }} | ||||||
| env: | ||||||
| BASE_REF: origin/${{ github.base_ref }} | ||||||
| run: uvx reflex-release@0.1.0a2 check-headings | ||||||
| - name: Check for news fragments | ||||||
| if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-changelog') }} | ||||||
| env: | ||||||
| BASE_REF: origin/${{ github.base_ref }} | ||||||
| run: uvx reflex-release@0.1.0a2 changelog-check | ||||||
| - name: Check the release workflows are up to date | ||||||
| run: uvx reflex-release@0.1.0a2 sync --check | ||||||
Uh oh!
There was an error while loading. Please reload this page.