Closed rvi closed 1 year ago
This sounds cool! I have never used pull requests templates. Can you describe with more detail how you think of integrating spr with this, from the little reading I did, it looks like this is mostly used when creating pull requests using the ui. But I guess there must be a nice way to render the template and then use the api?
Sounds good, I'll try to have something this week!
The gh
CLI also uses PR templates. By default when opening a PR with one commit, it:
.github/pull_request_template.md
You can see it in action with gh pr create
.
@ejoffe - I'd like to contribute a PR for pull request template support, but wanted to run my current thoughts by you on implementation. My current idea that I have working adds the following repo settings:
For example if you had a template like below you'd set the following settings and it would insert the generated body below the Description heading on PR create/update.
pullRequestTemplatePath: .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
pullRequestTemplateInsertStart: "# Description"
pullRequestTemplateInsertEnd: "# Checklist"
# Related Issues
<add related issues here>
Looks good to me. Lets give it a try.
Hey @ejoffe, I wanted to have your feedback on this feature? I think a lot of users are using PR template, it would be great to be able to use them as well. Let me know happy to give it a try!
Cheers,
Discussed in https://github.com/ejoffe/spr/discussions/263