-
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
Allow wildcards in "ignore" configuration option #642
Comments
Hi Arthur Thanks for the report. Can you please add more information about your feature request. What other files belong to the newsfragment directory ? I am happy to review and approve a PR that implementes simple glob expressions. |
Hi @adiroiban, thanks for the quick response. In our use case we maintain two separate changelogs files for two different audiences; one that captures change to the codebase itself and one that reports on any scientific changes to the output of that code. We do this by maintaining two configuration TOML files that build the two changelogs, each with their own fragment types. We keep all of our fragments in the same "changelog" directory and so when running As I'm writing that I'm realizing that we could also sidestep this issue by having two separate fragment directories, but that feels a bit more cumbersome than setting the ignore option to include |
The changes in I would say that using 2 separate news fragment directories is the best way here. To implement globbing the changes needs to go here towncrier/src/towncrier/_builder.py Lines 144 to 146 in fc3a255
Instead of doing a simple string comparision, we should use https://docs.python.org/3/library/fnmatch.html#fnmatch.fnmatch for each member of the ignore list If you have time, please consider creating a PR and I would be happy to review. Thanks |
@adiroiban, thanks for pointing me in the right direction! PR #644 should be ready for review. |
Since version 24.7.0 (and PR #622) there is an "ignore" configuration option that allows users to specify files that are known to have "wrong" filenames but still belong in the fragments directory.
It would be very helpful if this "ignore" option supported wildcards in filenames. For example:
Thanks!
The text was updated successfully, but these errors were encountered: