githubtraining / release-workflow

Course repo for Learning Lab course "Create a release based workflow".
https://lab.github.com/githubtraining/create-a-release-based-workflow
Creative Commons Attribution 4.0 International
1 stars 6 forks source link

Step 6 pull request template doesn't appear #138

Open Cmastris opened 3 years ago

Cmastris commented 3 years ago

Bug Report

Current behavior The Step 6 introduction (issue 5) includes the following:

To expedite the creation of this pull request, I've added a pull request template to the repository. Now when you create a pull request, default text will automatically be displayed, this should help you identify and fill out all the necessary information.

However, upon opening the pull request as instructed, the template doesn't appear. Instead, the comment field is empty:

image

This is a bit confusing and might cause the learner to think they've made a mistake.

Reproduction Steps to reproduce the behavior in the course:

  1. Go to issue 5 (step 6).
  2. Read the introduction and instructions.
  3. Click the "new pull request" link in step 1 of the activity, or open the pull request manually.
  4. See that the pull request comment field doesn't contain the template.

Expected behavior The pull request comment field should be populated with the release pull request template, as defined in pull_request_template.md.

Additional context A quick search surfaced a SO comment which indicated that PR templates need to be on the default branch. I think this might be the problem, as the pull_request_template.md template appears on the release-v1.0 branch but not on the main (default) branch (during step 6, i.e. ahead of merging).

I think this was introduced in #75 to avoid the template being used in the initial pull request, which would be confusing. Not sure how easy this would be to fix (or if it's even possible) while also preventing the template being used "early". It might be simpler to just change the Step 6 introduction to remove references to the template and just provide a generic pull request body which can be copy/pasted instead.

Thanks!