-
Notifications
You must be signed in to change notification settings - Fork 122
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
Fix incorrect handling of orphan fragment names consists of only digits #588
Conversation
Looking closer the true source of the error is because |
97f3dcd
to
d9b4139
Compare
There, that's tidier! |
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.
Looks good. Many thanks. Only a minor comment regarding the release notes.
"""Orphaned snippets can consist of only digits.""" | ||
self.assertEqual( | ||
parse_newfragment_basename("+123.feature", ["feature"]), | ||
("+123", "feature", 0), |
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.
Could you add another non-orphan test with an identifier looking like a commit sha? In the templates I've started using recently, I try to output PRs/issues, commits and arbitrary identifiers separately: https://github.com/cherrypy/cheroot/blob/3591a1c/docs/changelog-fragments.d/.towncrier-template.rst.j2#L59-L63.
It'd be nice if that remained functional. Hence an explicit test...
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.
I'd say that should be a separate PR -- that's an interesting functional test but not really tied to the changes being made here.
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.
The reason I brought it up is that I wasn't sure if this PR influences it. So it's kinda related as a possible regression. But I understand that it may be non-atomic and separate otherwise.
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 your feedback.
This test is named test_orphan_all_digits
. Based on that, I think that +123
is ok.
I also think that using a git commit ref is also a valid test... but it should be a separate test.
It looks good. I have enabled auto-merge. Thanks for your help. I am happy to review and approve a PR that add more tests... but that should not be a blocker for this PR. |
Fixes #584
Checklist
src/towncrier/newsfragments/
. Describe yourchange and include important information. Your change will be included in the public release notes.