-
Notifications
You must be signed in to change notification settings - Fork 120
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
[docs] Multiple issues per fragment #348
Comments
After a bit more searching, I can now see this grouping happens by fragment content here. Some comment/documentation should be added to reflect that this is possible and this is how towncrier groups issue numbers. |
For anyone in 2023, here's an updated link: towncrier/src/towncrier/_builder.py Line 173 in ab08d55
|
I don't think I understand the use case from here. An example with a set of input files and expected output together with the actual output would help a lot. We are happy to receive PR for documentation improvements. Thanks |
It would have helped if I'd used permalinks (issue now edited), so I'll update the links to show the issue. Option 1, allow multiple issues in the file title:
Option 2, match fragments based on their contents:
Or Option 3, don't support this at all and remove the example in the comments/output template. I'll be honest, I haven't kept up to date with this repo in the past year so this may have been implemented or the comment changed. If so, feel free to close. |
Ah, I see. So the input is a file name "231.462.212.feature" and this means that this features "closes/is associated" with ticket 231 and 462 and 212 while the text is the same I have never found this use case. It happens that when working on a branch for example for 231.feature, it happens that it also fixes "462.feature" and "212.bugfix" but each fragment has a separate text. To, me, having the exact same text for multiple tickets makes no sense :) It means that those tickets are duplicate... and 2 of them should be closed as duplicate , and keep only one. Or if they are not duplicates, they should have separate text...in separate files. The docs are now hosted at https://towncrier.readthedocs.io/en/stable/ I can see this documented here as Option 2 https://towncrier.readthedocs.io/en/stable/tutorial.html#creating-news-fragments
Are you saying this is a bug, and it doesn't work as documented? An actual example or steps to reproduce it would help. This is what I get on trunk (Option 2)
|
I personally would find this useful (I hate fixing a typo in three files), but I would suggest to use commas to make it a bit more idiomatic: |
@adiroiban Thanks for clarifying the current behaviour - I suspect this didn't work when I opened the issue in 2021. It was more about documenting the behaviour, and as this has been documented and works as expected, I'm happy to close (or re-focus) this issue.
To be clear, it's not the original tickets that have duplicate text, but the news fragment content. Given this is currently possible with duplication, it feels like a nice-to-have to consolidate duplicates into a single file. The format @hynek suggests seems best to me (and shows it's not just me who attaches multiple issues to a fragment :) ) |
It's still not clear :) If I am in feature branch targeting ticket
In a branch, you can add as many fragments as you like :) I think that this can be closed...since we sort of have documentation for this :) Feel free to add more comments to this ticket and we can reopen if the documentation is not good enough. |
I also agree it's dirty relying on the actual fragment content to group issues and that hynek's suggestion would be a better way (even if we keep the current behaviour for backwards compatibility). This ticket is specifically about the documentation of it, and we do have the feature (and it's documented) already even if it could be better. so I'm closing. I'll open a new ticket for the idea of having multiple issues in the fragment filename. |
The builder issue sorting code and the default template section item values suggest that it's possible to have multiple issues per each fragment.
Looking through the source code and the docs, it's not clear how a fragment could end up with more than one issue number. Parsing a fragment only uses the previous file part and there's no splitting or grouping that happens later, but by the time this gets passed to the template, issues are wrapped in a list.
Is this an intended upcoming feature? If not, the comments/template/builder code should be changed as there's no need to keep fragment issues as a list if there can only be one issue.
The text was updated successfully, but these errors were encountered: