-
Notifications
You must be signed in to change notification settings - Fork 1
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
Improve prdoc
Generation
#46
Comments
I don't feel that Auto-fill Semver Checks is currently feasible, as it's the doing of https://github.com/paritytech/parity-publish, which is dependent on prdoc itself. Not a huge fan of Pre-filled Audiences, but sounds good for an optional flag. Automatic PR Number, Auto-fill Title and Auto-fill Description would require GitHub token, of course, and also, finding the PR for the current fork+branch, which is a bit more complex than it sounds, but all doable, at least for a normal case, where there's only one PR from that branch. |
I do agree that all the proposed changes would be helpful. Pre-filled audiences are better as an option indeed, as well as the auto-filled description (I wouldn't like something like paritytech/polkadot#6161 to be copied to a prdoc by default 🫠). |
may be better to use https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/prdoc.md
|
I find number 6 particularly useful if your PR changes many crates. Generally I would love to avoid doing manual grunt work on the PRDocs. |
Yes, I think this would be best! |
currently /cmd prdoc already fills in the description from the description of PR and pushes the file, but could be improved from there. |
I would prefer not to use it for autofilling the title and description. I believe a PR doc should be written within five minutes after we have most of the information about our PR. We write in the PR |
@AndreiEres no you fill it in with arguments from the command, i guess in most cases there's no need to edit it again on local and push. The description is being filled from the PR description, title and audience you provide via args |
There is a JSON schema that you can install that gives your IDE hints and auto-complete.
This is done by the prdoc command, or you can run the script locally, works the same. Generally we should try to make the prdoc CLI more ergonomic. It is now a Parity fork, and we can deviate from its initial design goal of being un-opinionated and general. Maybe integrating the logic of that python script and using GH cli or something to resolve the current MR number
We had this in the past, and noone edited it. Most PRdocs merged with wrong audience.
This is difficult since it requires specific compiler versions and then compiles each crate twice. Not impossible to reproduce locally, but probably not easy. |
after some DM conversations, the final plan looks like this:
this way we will have the same generate capabilities working locally and/or from PR |
The current functionality of
prdoc generate <NUMBER>
is essentially copyingpr_template.prdoc
topr_<NUMBER>.prdoc
. Assuming that aprdoc
can be generated after a PR is almost ready, I would like to propose some enhancements to automate this process further:prdoc generate
and automatically query the current PR number.- audience: [Node Dev, Runtime Dev, ...]
, with a comment saying "Remove audiences you don’t need" could help in remembering the available audiences.description
field, allowing the user to remove obsolete parts and edit it directly inprdoc
.I believe these improvements can make the work with
prdoc
smoother and more efficient. I would appreciate any feedback or suggestions on these proposed changes.The text was updated successfully, but these errors were encountered: