.github/PULL_REQUEST_TEMPLATE.md とは
.github/PULL_REQUEST_TEMPLATE.md は、リポジトリの Pull Request を作成するときのテンプレートファイルです。
.github ディレクトリの他、リポジトリルートや docs ディレクトリに配置することもできます。
.github/ISSUE_TEMPLATE/config.yml- [New Issue] ボタンを押したときの挙動を設定するファイル
blank_issues_enabled: 空の Issue を作成できるかどうかcontact_links: 特定の種別の課題に関する外部リンク
.github/ISSUE_TEMPLATEのその他の*.ymlファイル- 独自の Issue テンプレートファイル
作り方
ゼロから書く必要があります。
テンプレートが1つでよければ .github/PULL_REQUEST_TEMPLATE.md を作ります。
複数のテンプレートを使用する場合は .github/PULL_REQUEST_TEMPLATE/ ディレクトリを作成し、その中に複数の *.md ファイルを配置します。
詳細はドキュメントに記載されています。
参考:PowerToys
microsoft/PowerToys のリポジトリでは、 .github/pull_request_template.md がテンプレートとなっています。
内容はチェックリスト、説明欄、検証手順といった項目が含まれています。
.github/PULL_REQUEST_TEMPLATE.md の表示箇所
リポジトリに .github/PULL_REQUEST_TEMPLATE.md ファイルがある場合、Pull Request の作成時にテンプレートが選択されます。
ただし複数のテンプレートがリポジトリにある場合、通常手順の Pull Request 作成画面ではテンプレートを選択できないため、URL でテンプレートを指定する必要があります。
pull_request_template1.mdというテンプレートの場合https://github.com/<org>/<repo>/compare/<base-branch>...<compare-branch>?quick_pull=1&template=pull_request_template1.md
pull_request_template2.mdというテンプレートの場合https://github.com/<org>/<repo>/compare/<base-branch>...<compare-branch>?quick_pull=1&template=pull_request_template2.md
pull_request_template3.mdというテンプレートの場合https://github.com/<org>/<repo>/compare/<base-branch>...<compare-branch>?quick_pull=1&template=pull_request_template3.md
まとめ
.github に配置できるファイルの一覧はこちらの記事でまとめています。