openstreetmap-website icon indicating copy to clipboard operation
openstreetmap-website copied to clipboard

Add pull request template

Open rkoeze opened this issue 1 year ago • 5 comments

Adds a PR template to encourage standard descriptions as discussed in https://github.com/openstreetmap/openstreetmap-website/issues/4912#issuecomment-2182690072.

rkoeze avatar Jun 22 '24 17:06 rkoeze

Does that template really address the things @gravitystorm was talking about? It doesn't seem like it does to me but then I'm not sure a PR template can which is why I was a bit confused by the suggestion - the automation he was suggesting seems more likely to work.

I'm certainly not convinced that asking people to assess the risk of a change is going to be useful - risk of what exactly? If somebody truly thought a change was risky then they shouldn't really be proposing it!

tomhughes avatar Jun 22 '24 23:06 tomhughes

Hi @tomhughes! I think there's probably a version of a PR template that does address what @gravitystorm was talking about (most likely in the form of a checklist). This template does not try to do that. It's aim is to enforce a consistent PR description. If that doesn't make sense for this repo, I'm happy to close this PR. After all, this change is meant to make the lives of reviewers easier!

I can definitely remove the risk section. I've found that in other projects asking for a risk assessment can be a useful exercise for the contributor. It can also give the reviewer helpful context when testing. A worst case idea of "what could go wrong here" is what I mean by risk.

Thank you for your feedback.

rkoeze avatar Jun 22 '24 23:06 rkoeze

Thanks @tordans! I removed the risk section and added the link to the PR section of the contributing guidelines as you suggested.

rkoeze avatar Jun 23 '24 12:06 rkoeze

Dear @rkoeze ,

I really like idea of using PR templates. Thank you very much for it and for your PR. But, here is how it looks when I add it to my forked repository (maybe I made mistake while adding to repository, please, let me know):

image

Wouldn't be better if it would look like when reporting issue, i.e. something like this:

image

So, perhaps we could create new folder (.github/PULL_REQUEST_TEMPLATE) and sets of templates (perhaps in YML format, like for issues?), like in case of reporting issue, where we will fill the form rather than edit template?

Thanks, Nenad.

nenad-vujicic avatar Jul 30 '24 12:07 nenad-vujicic

Hi @nenad-vujicic! Thank you for the feedback. If you click preview, the markdown should correctly render the "Description" and "How has this been tested?" sections. The rest of the template should not render as it's only intended to be viewed by the person writing the PR.

As far as I'm aware it's not possible to use YML for PR templates (although I'm happy to be corrected on that point). One advantage of using markdown in this fashion is that while it provides a schema for the PR description, the individual making the PR can still alter it if it does not suit their needs.

rkoeze avatar Aug 03 '24 18:08 rkoeze

Thanks for the suggestion @rkoeze and for making changes based on the feedback. I've merged this now, let's see how it goes!

Thanks also to @tordans and @nenad-vujicic for reviewing this PR, it's appreciated.

gravitystorm avatar Oct 16 '24 16:10 gravitystorm