-
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
Add docs for CLI orphan fragments #589
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This is much better. Much appreciated :)
I was always confused by the orphan thing...as I don't use or need it
I think is best to also mention this behaviour in the create docstring
towncrier/src/towncrier/create.py
Lines 46 to 68 in 914b446
def _main( | |
ctx: click.Context, | |
directory: str | None, | |
config: str | None, | |
filename: str, | |
edit: bool, | |
content: str, | |
) -> None: | |
""" | |
Create a new news fragment. | |
Create a new news fragment called FILENAME or pass the full path for a file. | |
Towncrier has a few standard types of news fragments, signified by the file extension. | |
\b | |
These are: | |
* .feature - a new feature | |
* .bugfix - a bug fix | |
* .doc - a documentation improvement, | |
* .removal - a deprecation or removal of public API, | |
* .misc - a ticket has been closed, but it is not of interest to users. | |
""" | |
__main(ctx, directory, config, filename, edit, content) |
In this way, the info is found in towncrier create --help
The idea is that in the future we can just run some helper utility for click and it will automatically generate the .RST documentation for the CLI.
I think is best to keep as much info as possible into the --help
part.
For the --help
docstring , we can keep the info brief,
Just mention that you can use +
as the ticket number and towncrier will auto-generate
More info and examples, can be found in the RST version.
Thanks again
Thanks Chris. I have merged this. I added you to the list of maintainer, so if the future you should be able to merge a PR once it is approved. Just make sure that any change is reviewed and approved before a merge. Thanks again! |
towncrier create +.feature.rst
wasn't documented.