4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

githubのPR(プルリクエスト)のテンプレート機能が便利

Posted at

githubの大きなメイン機能としてPullRequest(プルリクエスト・PR)があるが、
プルリク作成時のコメント記載箇所にテンプレート導入ができるみたいなのでやってみたら便利だった。

PullRequestテンプレート導入方法

TEMPLATEファイル作成

pull_request_template.mdまたはPULL_REQUEST_TEMPLATE.md

というファイル名でテンプレートを作ります。
内容はこんな感じ

# pr review template test

## title

- 改修内容。
- 変更理由

## memo

- その他備考

※ファイル拡張子の指定は特にないようだが、マークダウン形式で記載しておくと
PR作成時にpreviewで整形できるので便利かと思います。

TEMPLATEファイル配置

リポジトリ直下に上記のテンプレートファイルを配置し、コミットする。
すると次回よりプルリク作成時に自動的にテンプレートが展開されます。
プロジェクトなど記載情報の統一化を図りたい場合やナレッジとしてノウハウを残す際にとても便利だなと思いました。

スクリーンショット 2019-11-06 15.34.01.png スクリーンショット 2019-11-06 15.45.30.png
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?