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

Strip down integer ticket numbers #278

Merged
merged 8 commits into from
Dec 8, 2020

Conversation

altendky
Copy link
Member

@altendky altendky commented Oct 16, 2020

Fixes #126 .

@codecov-io
Copy link

codecov-io commented Oct 16, 2020

Codecov Report

Merging #278 (a20ebd6) into master (15644ca) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #278      +/-   ##
==========================================
+ Coverage   95.32%   95.37%   +0.04%     
==========================================
  Files          20       20              
  Lines        1027     1038      +11     
  Branches      104      104              
==========================================
+ Hits          979      990      +11     
  Misses         27       27              
  Partials       21       21              
Impacted Files Coverage Δ
src/towncrier/_builder.py 93.84% <100.00%> (+0.35%) ⬆️
src/towncrier/test/test_builder.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15644ca...a20ebd6. Read the comment docs.

@altendky altendky closed this Dec 3, 2020
@altendky altendky reopened this Dec 3, 2020
@@ -66,3 +66,15 @@ def test_dots_in_ticket_name_and_counter(self):
parse_newfragment_basename("baz.1.2.feature.3", ["feature"]),
("2", "feature", 3),
)

def test_strip(self):
self.assertEqual(
Copy link
Member

Choose a reason for hiding this comment

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

Minor comment

would be nice to have a docstring explaing the scope/purpose/expectation of this test :)

This can serve as the developer documentation for this feature.

Copy link
Member Author

Choose a reason for hiding this comment

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

https://github.com/twisted/towncrier/pull/278/files#diff-b7254cf4717de60e5d2e57233db4f5cbb47871439b71f2280bed581ff9fcf851R71-R73

        """Leading spaces and subsequent leading zeros are stripped
        when parsing newsfragment names into ticket numbers etc.
        """

Copy link
Member

@adiroiban adiroiban left a comment

Choose a reason for hiding this comment

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

Great work. Thanks!

@altendky altendky merged commit ef1be45 into twisted:master Dec 8, 2020
@altendky altendky deleted the 126-strip_leading_zeros_on_issues branch December 8, 2020 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Leading zeros in issue-numbers are not stripped
3 participants