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?

【git-spice】submit時に自動でreviewerを設定する方法

Posted at

設定方法

フラグで指定する方法

gs branch submitコマンドに--reviewerフラグを追加することで、reviewerを指定できます。

# 個人のreviewerを指定
gs branch submit --reviewer username

# チームのreviewerを指定(GitHub)
gs branch submit --reviewer org/team-name

設定ファイルで指定する方法

毎回フラグを指定するのが面倒な場合は、git configで設定しておくと便利です。

# 個人のreviewerを設定
git config spice.submit.reviewers 'username'

# チームのreviewerを設定
git config spice.submit.reviewers 'example/my-team'

チーム全体に常にレビュー依頼を送る

git config spice.submit.reviewers 'myorg/backend-team'

この設定をしておくと、gs branch submitを実行するたびに、自動的にbackend-teamにレビュー依頼が送られます。

複数のreviewerを設定する

カンマ区切りで複数のreviewerを指定できます。

git config spice.submit.reviewers 'alice,bob,myorg/frontend-team'

フラグと設定ファイルの組み合わせ

設定ファイルで基本的なreviewerを設定しつつ、フラグで追加のreviewerを指定することもできます。両方の値がマージされます。

# 設定ファイルでチームを設定
git config spice.submit.reviewers 'myorg/my-team'

# 実行時に個別のreviewerを追加
gs branch submit --reviewer alice
# → myorg/my-teamとaliceの両方がreviewerに設定される

参考

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?