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?

個人的「質はともかく継続する」39日目です。

githubのissueを一括操作

GitHub CLI を利用して、issueをエクスポートしたりインポートしたり出来ます。

GitHub CLI のインストール

公式を参考にインストール。
https://github.com/cli/cli#installation

ログイン

CLIでログインします。
私はブラウザで認証してますが、お好みで。

gh auth login

リポジトリクローン

リポジトリをクローンして移動します。すでにクローン済みのリポジトリがあれば、そこに移動しましょう。

gh repo clone https://github.com/XXXXX.git

エクスポート

出力したい項目を指定すると、指定した項目が出力されます。ステータスの状態等で絞り込むことも可能です。
https://cli.github.com/manual/gh_issue_list

基本的な情報

gh issue list

オープン中のみ

gh issue list --state open

create issue で使える項目

gh issue list --state all --json 'assignees,body,labels,milestone,title' > issue.json

すべて出力

gh issue list --state all --json 'assignees,author,body,closed,closedAt,comments,createdAt,id,labels,,number,projectCards,reactionGroups,state,stateReason,title,updatedAt,url'

インポート

現状はインポートする手段がないようです。
エクスポートしたjsonファイルをcsv等に変換して、クリエイト文を作成する等で代替はできそう。

作成出来る項目は以下参照。
https://cli.github.com/manual/gh_issue_create

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?