github-tools / github

A higher-level wrapper around the Github API. Intended for the browser.
BSD 3-Clause "New" or "Revised" License
3.56k stars 754 forks source link

PR templates - support for inputs #678

Open Martin-Suska opened 2 years ago

Martin-Suska commented 2 years ago

Hi,

This is a request for a feature: I'd like to have a possibility to specify a fields, that needs to be/or can be entered easily in a PR template.

For example, I want a developer to link a Jira issue in a PR it is related to (we have it in commit, ideally in each one, but it easier to have it in PR description).

So similarly to simple checkbox, I'd like to have easy way in "Preview" tab for PR authors to enter required inputs.

Jira issue: {TODO}

Maybe a first version might be as simple as this: the text between {} will be replaced (so it will work first time only) on first edit, Maybe someone could extend this for edits.

Also I'd like to have an option to mark it mandatory, for example

Jira issue: {*TODO}

might be a version for mandatory input, so only draft PR can be created if not filled in.

Thanks!

Martin-Suska commented 2 years ago

If someone can point me directly where checkboxes ([ ] in markdown) are handled, maybe I can implement it and create a PR.