-
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
handle changelog entries with towncrier
#1826
Conversation
towncrier
to handle changelog entries
towncrier
to handle changelog entriestowncrier
How could we update our changelog check to use the new format? I see the Also, for the "running changelog" I'm thinking one option might be to add a |
79b1552
to
064d14f
Compare
I think this might be unnecessary, as anyone can run |
26cc7b6
to
bfedcfa
Compare
Is there a way to tell towncrier to check for a fragment for a particular PR number? Let's say we open a PR 1900 with some feature. Is there a way to check that a |
the docs aren't clear: https://towncrier.readthedocs.io/en/stable/cli.html#towncrier-check I'll test with another test branch |
I don't see how it would have a way to know the PR number; I think that's why the changelog bot is used. ❯ towncrier check --compare-with changelog/towncrier
Looking at these files:
----
1. /Users/zburnett/projects/asdf/README.rst
----
No new newsfragments found on this branch. ❯ touch changes/2122.misc.rst ❯ towncrier check --compare-with changelog/towncrier
Looking at these files:
----
1. /Users/zburnett/projects/asdf/README.rst
2. /Users/zburnett/projects/asdf/changes/2122.misc.rst
----
Found:
1. /Users/zburnett/projects/asdf/changes/2122.misc.rst |
Thanks for checking. I guess we could re-introduce the regex and update it to check either the output of Also, do you have a suggestion for our docs? They list the changelog contents: Line 7 in dbbc26f
and I can see a benefit to generating a "draft" changelog for PR docs builds (to make sure the added changelog doesn't cause a sphinx error on release). |
we could add |
bfedcfa
to
6408eea
Compare
a49d32f
to
1104c78
Compare
99de7eb
to
4dfee81
Compare
4dfee81
to
ddcf4c7
Compare
9a078f7
to
4affaae
Compare
f21fdfb
to
79d9232
Compare
79d9232
to
b8e791c
Compare
changelog: | ||
name: Confirm changelog entry | ||
check: | ||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-entry-needed') }} |
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 the step
and that the job shows as skipped. Previously when the no-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
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.
Thanks for putting this all together!
I think the regex isn't quite right: |
fixed in #1828
|
Description
towncrier
expects "news fragment" files (text files in thechanges/
directory with filenames in the format<PR#>.<changetype>.rst
, i.e. for this PR it would bechanges/1826.misc.rst
). See docs at https://towncrier.readthedocs.io/en/latest/tutorial.html#creating-news-fragmentswhen ready to make a release, run
towncrier build
to ingest the news fragments and generate a changelog section inCHANGES.rst
with all the new change log entries for that release (this clears thechanges/
directory). This step should either be done before making a release, or could probably be added to a GitHub workflow triggered on release (to insert a commit and remake the tag).After merging this PR the
Release Process
wiki page will need to be updated to include a step to runtowncrier
and add toCHANGES.rst
.Currently this PR uses the default
towncrier
change types:feature
: Signifying a new feature.bugfix
: Signifying a bug fix.doc
: Signifying a documentation improvement.removal
: Signifying a deprecation or removal of public API.misc
: An issue has been closed, but it is not of interest to users.However, you can also define custom types; I think it might be easier for users to use the above sections in the changelog instead of what we currently use (more or less one section per-module). I can add those sections back though, if that's better
Checklist: