Skip to content
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 orphan fragments with numbers #564

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
.vs/
.vscode
Justfile
*egg-info/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can have this. I have this rule in my global gitignore file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call.
Also this is a python project, so i'd expect that directory to exist eventually.

towncrier.test.test_*/
adiroiban marked this conversation as resolved.
Show resolved Hide resolved
_trial_temp*/
apidocs/
dist/
Expand Down
12 changes: 12 additions & 0 deletions src/towncrier/test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ def _test_command(self, command):
f.write("Orphaned feature")
with open("foo/newsfragments/+xxx.feature", "w") as f:
f.write("Another orphaned feature")
with open("foo/newsfragments/+123_orphaned.feature", "w") as f:
f.write("An orphaned feature starting with a number")
with open("foo/newsfragments/+12.3_orphaned.feature", "w") as f:
f.write("An orphaned feature starting with a dotted number")
with open("foo/newsfragments/+orphaned_123.feature", "w") as f:
f.write("An orphaned feature ending with a number")
with open("foo/newsfragments/+orphaned_12.3.feature", "w") as f:
f.write("An orphaned feature ending with a dotted number")
# Towncrier ignores files that don't have a dot
with open("foo/newsfragments/README", "w") as f:
f.write("Blah blah")
Expand Down Expand Up @@ -73,6 +81,10 @@ def _test_command(self, command):
- Baz fix levitation (#2)
- Adds levitation (#123)
- Extends levitation (#124)
- An orphaned feature ending with a dotted number
- An orphaned feature ending with a number
- An orphaned feature starting with a dotted number
- An orphaned feature starting with a number
- Another orphaned feature
- Orphaned feature

Expand Down
Loading