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 5 years have passed since last update.

GitHub の Web UI で PR をマージした時のコミットのメタデータ(あるいは失敗談)

Posted at

(この記事は私の blog の http://umezawa.dyndns.info/wordpress/?p=7363 の転載です)

GitHub の Web UI で PR をマージした時のコミットの Author や Commit がどうなるかという話です。PR のマージ以外にも GitHub 上でコミットを生成する方法は他にもあったはずですが、おそらく同じことになると思います。

結論から言うと、

Author の名前の部分
Public profile の Name に指定したもの。
Author のメールアドレスの部分
Public profile の Public email に指定したもの…のはず。これを空にしている場合、 GitHubのID@users.noreply.github.com になる。
Commit の名前の部分
GitHub
Commit のメールアドレスの部分
noreply@github.com

になります。

で、 Author の名前の部分なんですが、 Name に漢字を入れているとそのまま Author に入ってきます。結果として、例えばマージコミット https://github.com/umezawatakeshi/test/commit/a84e701930d1e4c737173bd76b7da6b80c9e38bb を見ると以下のようになってしまいます。

$ git show --pretty=fuller
commit a84e701930d1e4c737173bd76b7da6b80c9e38bb
Merge: d45a835 f62c178
Author:     梅澤威志 / UMEZAWA Takeshi <umezawatakeshi@users.noreply.github.com>
AuthorDate: Sun Oct 6 23:51:32 2019 +0900
Commit:     GitHub <noreply@github.com>
CommitDate: Sun Oct 6 23:51:32 2019 +0900

    Merge pull request #4 from umezawatakeshi/hoge-branch

    うんたらかんたら

ここに漢字が入ってくるのはちょっとなぁ…と思ったので、 Name をアルファベット表記だけに変更しました。

なお、Git はやろうと思えば後からいくらでも履歴を修正できますが、 GitHub の PR のマージコミットを修正してしまうと GitHub 側の PR と不整合が起きてしまうため、既にリポジトリに入ってしまったマージコミットを修正するのはあきらめました。

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?