#714 feature(create): added option 'index' which allows direct access to indexed snippets#735
#714 feature(create): added option 'index' which allows direct access to indexed snippets#735tirolerstefan wants to merge 11 commits into
Conversation
…ndexed snippets, e.g. issue-1234.feat.3.md
for more information, see https://pre-commit.ci
…tefan/towncrier into create_using_index_#714
|
Hi Stefan. Thanks for the PR. It might be the case that our pre-commit is not yet ready for Python 3.15 I will take a look |
|
Thanks a lot for checking this. |
|
Can you push your changes using |
|
My changes are pushed and up2date. All I wanted to commit are the fixes for
the hooks. Thanks!
|
adiroiban
left a comment
There was a problem hiding this comment.
Thanks for the PR and sorry for the late review.
I left a few inline comments.
To merge, this PR needs updated autoamted tests.
Thanks again
| bar | ||
|
|
||
| """ | ||
|
|
There was a problem hiding this comment.
this was one of the "auto fixes" of pre-commit.
no, it's not needed in my eyes, but i have to commit it using "--no-verify".
if you don't mind, i will leave it as it is to satisfy the pre-commit tools.
| help="The section to create the fragment for.", | ||
| ) | ||
| @click.option( | ||
| "--index", |
There was a problem hiding this comment.
Index is kind of generic...
Maybe it's best to be more explicit to prevent future conflicts and confusions/
| "--index", | |
| "--issue-index", |
I don't know if "index" is the best name for this feature... maybe we can call it --sub-issue or someting like that
There was a problem hiding this comment.
hmmm, it's like an index - 0 is the first fragment, 1 the next, etc. but i can live with any text.
"sub-issue" is totally ok, "sub-fragment" or "fragment-number", "fragment-id", "sub-id"?
|
hi @adiroiban - thanks, i have added my comments above and pushed a new commit. |
for more information, see https://pre-commit.ci
Fixes #714
Towncried currently adds an index if a snippet already exists, e.g.
issue-1234.feat.mdis available, soissue-1234.feat.1.mdis created.We have a graphical tool for changelog snippet creation and wanted to directly access the indexed snippets - so an overwrite is possible.
With this change, a new option "--index" is added.
e.g.
If index == 0, the filename without index is accessed.
If index > 0, the index is added to the filename.
If option "index" is not passed, the tool behaves as before - the next index is chosen.