0
0

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 1 year has passed since last update.

[GitHub] PRを閉じる際に対応するIssueもクローズする

Posted at

やりたいこと

  • GitHubフローを回してるときに、以下のようなことを考えた
    • 「ひとつのIssueに対してひとつのPRが対応するのなら」
    • 「PRを閉じたときに、対応するIssueも閉じればお得では?」

方法

  • PRの最初の説明文に以下のようなキーワードを含める
close {issue id}
  • closeのほかにもいろいろバリエーションはあるけど、結果は同じ?っぽい)

試してみる

image.png

テスト用のIssueを作成して...

image.png

image.png

Issueに対応するブランチを切り...

image.png

適当にりどみに更新をかけ、PRを作成してみました
ここでメッセージ文をclose #1としておきます

image.png

プルリクを作成し、マージして...

image.png

image.png

IssueのClosedを見てみると...

image.png

おー!!!!!!
勝手に閉じてる!!!!!!!!!!!!!!!!!!!11

おわりに

明日から使えるライフハックです。ぜひ

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?