-
Notifications
You must be signed in to change notification settings - Fork 58
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
handle changelog entries with towncrier
#1826
Merged
braingram
merged 6 commits into
asdf-format:main
from
zacharyburnett:changelog/towncrier
Aug 19, 2024
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
eaf107e
add towncrier configuration
zacharyburnett 660612c
use towncrier
zacharyburnett ddcf4c7
run towncrier in readthedocs job
zacharyburnett 793a830
change header level
zacharyburnett bc4fa67
use towncrier check and towncrier build --draft
zacharyburnett b8e791c
add links to issue numbers in changelog
zacharyburnett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
name: Changelog | ||
name: changelog | ||
|
||
on: | ||
pull_request: | ||
types: [labeled, unlabeled, opened, synchronize, reopened] | ||
types: | ||
- labeled | ||
- unlabeled | ||
- opened | ||
- synchronize | ||
- reopened | ||
|
||
# Only cancel in-progress jobs or runs for the current workflow | ||
# This cancels the already triggered workflows for a specific PR without canceling | ||
# other instances of this workflow (other PRs, scheduled triggers, etc) when something | ||
# within that PR re-triggers this CI | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
changelog: | ||
name: Confirm changelog entry | ||
check: | ||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-entry-needed') }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Grep for PR number in CHANGES.rst | ||
run: grep -P '\[[^\]]*#${{github.event.number}}[,\]]' CHANGES.rst | ||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-entry-needed') }} | ||
- run: pip install . | ||
- run: pip install towncrier | ||
- run: towncrier check | ||
- run: towncrier build --draft | grep -P '[\(\[][^\)\]]*#${{ github.event.number }}[,\)\]]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last question related to these changes and the branch protection.
Our changelog check is listed as one of the branch protection rules (I am in the process of updating these so it might not show as required at the moment). I see this skip is at the
job
level now instead of thestep
and that the job shows as skipped. Previously when theno-changelog-entry-needed
label was added the job still ran but the check was skipped (see this run) which I believe allowed the branch protection to pass. Will it still pass if the job is skipped (and not just the check)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes indeed, as evidenced by this PR