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

GitHub CLI を使ってファイルから issue を作成する

Posted at

GitHub CLI を使って issue を登録してみます。issue の body にはファイルを使用してみます。

ディレクトリ構成

.
├── PersonalTaskManagement
└── issue
    └── first-issue.md

issue の body に使用するファイルの中身

$ cat issue/first-issue.md
First issue from gh

## Header

This is a section.

issue 作成

createで issue を作成します。-tオプションでタイトルを、-Fで body に使用するファイルを指定します。

$ cd PersonalTaskManagement
$ gh issue create -t "[cli]First issue" -F ../issue/first-issue.md

Creating issue in kiyo27/PersonalTaskManagement

https://github.com/kiyo27/PersonalTaskManagement/issues/12

作成した issue をブラウザで確認してみます。cli で gh issue view -w numberでブラウザを開くことができます。

$ gh issue view -w 12

create-issue.png

Markdown にも対応していますね。

その他

issue リストを表示

$ gh issue list

Showing 2 of 2 open issues in kiyo27/PersonalTaskManagement

#12  [cli]First issue   (backlog)     about 16 minutes ago
#10  [test]First issue  (inprogress)  about 3 hours ago

issue の body を確認

$ gh issue view 12
[cli]First issue
Open • kiyo27 opened about 17 minutes ago • 0 comments
Labels: backlog
Projects: todo (Backlog)


  First issue from gh

  ## Header

  This is a section.


View this issue on GitHub: https://github.com/kiyo27/PersonalTaskManagement/issues/12

issue の更新

$ gh issue edit 12 --add-assignee @me
https://github.com/kiyo27/PersonalTaskManagement/issues/12

issue にコメント

$ gh issue comment 12 -b "comment from gh"
https://github.com/kiyo27/PersonalTaskManagement/issues/12#issuecomment-123456789

issue クローズ

$ gh issue close 12
✓ Closed issue #12 ([cli]First issue)
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?