-
Notifications
You must be signed in to change notification settings - Fork 52
add PR template for new SPECs #393
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
base: main
Are you sure you want to change the base?
Conversation
Ohh, it's too bad that unlike issues, we cannot template different types of PRs. Maybe then just a link to a docs page and template? Or a bot comment with the checklist on any PRs that adds a new spec file/directory? (Though that will be just as after the fact as us commenting) |
OK, so I tried "the fancy way" and it seems to work: To get the proof-of-concept I had to merge this PR's changes into EDIT: here's the URL if you want to fiddle with the UX: https://github.com/drammock/specs/compare/main...drammock:specs:bar?expand=1 |
@@ -0,0 +1,3 @@ | |||
If you are opening this PR to propose a new SPEC, please go to the `Preview` tab, | |||
then [click here for the new SPEC templatee](?expand=1&template=new_spec.md). |
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.
If folks do like it, we should fix this typo before merging:
then [click here for the new SPEC templatee](?expand=1&template=new_spec.md). | |
then [click here for the new SPEC template](?expand=1&template=new_spec.md). |
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.
looks good!
FWIW having a template is nice. Thanks! |
@jarrodmillman proposed this idea at the Summit and I volunteered to implement.
However, I'm actually not sure it's a good idea to merge this, because:The template's current location and filenameLocating the template at.github/pull_request_template.md
should mean that it shows up on every new PR; however, this repo gets PRs other than new SPEC proposals (e.g., to update draft SPECs, add project endorsements, etc), and the new-SPEC-specific PR template won't be relevant for those.?template=propose_a_new_spec.md
. (They also require storing the templates in.github/PULL_REQUEST_TEMPLATE/
, and if one does so, new PRs opened through the UI will not use any template at all.)It might be possible to hack a solution by making a default template at
.github/pull_request_template.md
that includes relative links to the various templates using URL query parameters (example here), but that feels a bit brittle / over-engineered. LMK if there's appetite for that approach though, and I can give it a shot. EDIT: I've now implemented this approach, see below.Other note: while Issue templates can be defined in YAML files and include built-in validation, PR templates cannot. Validation would have to use a GH Action (example here).