LoginSignup
1
1

More than 3 years have passed since last update.

Githubのコマンドラインツール「GitHub CLI」を試してみた ~ issue編~

Posted at

はじめに

Githubのコマンドラインツール「GitHub CLI」が公開されたので、少し試してみました。
現在の「GitHub CLI」は、issueとプルリクエストに関する機能が提供されています。
この記事では、issueに関する内容を記載しています。

※ ベータ版なので、記載している内容は将来的に変更になる可能性があります。

環境

試した環境は、Windows10でGithub CLIのバージョンは0.5.5です。

issue create

issueを作成します。
オプションなしで実行すると、対話形式でタイトルと本文を入力できます。

gh issue create

? Title new issue
? Body [(e) to launch notepad, enter to skip]
? What's next?  [Use arrows to move, type to filter]
  Preview in browser
> Submit
  Cancel

オプションでタイトルと本文を入力できます。

gh issue create -t "new issue2" -b "new issue body"

issue list

存在するissueの一覧が表示されます。

gh issue list

#2  new issue2
#1  new issue
オプション 説明
-a, --assignee Assigneeでフィルタリング gh issue list -a [User Name]
-l, --label Labelでフィルタリング gh issue list -l bug
-L, --limit 表示件数の指定(既定は30) gh issue list -L 10
-s, --state 状態(open/closed/all)でフィルタリング gh issue list -s open

issue status

Openのissueを状態別に表示します。

gh issue status

Issues assigned to you
  #2 new issue2  (bug) less than a minute ago

Issues mentioning you
  #2 new issue2  (bug) less than a minute ago

Issues opened by you
  #2 new issue2  (bug) less than a minute ago
  #1 new issue about 19 minutes ago
  • Issues assigned to youは、自分がAssigneesに設定されているissueが表示されます。
  • Issues mentioning youは、自分がメンションされているissueが表示されます。
  • Issues opened by youは、自分が作成したissueが表示されます。

issue view

issueをブラウザで開きます。

gh issue view 1

-pオプションを付けることで、ブラウザではなくコンソール上で確認できます。

gh issue view -p 1
1
1
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
1
1