backlog-exporter 0.5.1 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +97 -9
- package/dist/commands/all/index.d.ts +2 -0
- package/dist/commands/all/index.js +124 -75
- package/dist/utils/backlog-api.d.ts +29 -0
- package/dist/utils/backlog-api.js +59 -1
- package/oclif.manifest.json +50 -32
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 ShuntaToda
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -15,6 +15,8 @@ Backlog のデータをエクスポートするためのコマンドラインツ
|
|
|
15
15
|
* [Wikiのエクスポート](#wikiのエクスポート)
|
|
16
16
|
* [ドキュメントのエクスポート](#ドキュメントのエクスポート)
|
|
17
17
|
* [課題・Wiki・ドキュメントの一括エクスポート](#課題wikiドキュメントの一括エクスポート)
|
|
18
|
+
* [特定のデータタイプのみをエクスポート(onlyフラグ)](#特定のデータタイプのみをエクスポートonlyフラグ)
|
|
19
|
+
* [特定のデータタイプを除外してエクスポート(excludeフラグ)](#特定のデータタイプを除外してエクスポートexcludeフラグ)
|
|
18
20
|
* [データの更新](#データの更新)
|
|
19
21
|
* [npxを使った課題のエクスポート](#npxを使った課題のエクスポート)
|
|
20
22
|
* [npxを使ったデータの更新](#npxを使ったデータの更新)
|
|
@@ -31,6 +33,12 @@ Backlog のデータをエクスポートするためのコマンドラインツ
|
|
|
31
33
|
* [課題・Wiki・ドキュメント の一括エクスポート](#課題wikiドキュメント-の一括エクスポート)
|
|
32
34
|
* [基本的な使用方法](#基本的な使用方法)
|
|
33
35
|
* [出力先を指定](#出力先を指定)
|
|
36
|
+
* [特定のデータタイプのみをエクスポート(onlyフラグ)](#特定のデータタイプのみをエクスポートonlyフラグ)
|
|
37
|
+
* [特定のデータタイプを除外してエクスポート(excludeフラグ)](#特定のデータタイプを除外してエクスポートexcludeフラグ)
|
|
38
|
+
* [課題とWikiのみをエクスポート](#課題とwikiのみをエクスポート)
|
|
39
|
+
* [ドキュメントのみをエクスポート](#ドキュメントのみをエクスポート)
|
|
40
|
+
* [ドキュメント以外(課題とWiki)をエクスポート](#ドキュメント以外課題とwikiをエクスポート)
|
|
41
|
+
* [課題以外(WikiとDocuments)をエクスポート](#課題以外wikiとdocumentsをエクスポート)
|
|
34
42
|
* [データの更新](#データの更新)
|
|
35
43
|
* [カレントディレクトリとそのサブディレクトリのデータを更新](#カレントディレクトリとそのサブディレクトリのデータを更新)
|
|
36
44
|
* [指定したディレクトリとそのサブディレクトリのデータを更新](#指定したディレクトリとそのサブディレクトリのデータを更新)
|
|
@@ -52,7 +60,7 @@ Backlog のデータをエクスポートするためのコマンドラインツ
|
|
|
52
60
|
backlog-exporter は、Backlog のデータをローカルにエクスポートするためのコマンドラインツールです。
|
|
53
61
|
現在、以下の機能をサポートしています:
|
|
54
62
|
|
|
55
|
-
- **課題(Issue)のエクスポート**:Backlog の課題を Markdown
|
|
63
|
+
- **課題(Issue)のエクスポート**:Backlog の課題を Markdown ファイルとして保存(カスタム属性対応)
|
|
56
64
|
- **Wiki 記事のエクスポート**:Backlog の Wiki 記事を Markdown ファイルとして保存
|
|
57
65
|
- **ドキュメントのエクスポート**:Backlog のドキュメントを Markdown ファイルとして保存
|
|
58
66
|
- **一括エクスポート**:課題・Wiki・ドキュメントを同時に取得する機能
|
|
@@ -66,7 +74,7 @@ $ npm install -g backlog-exporter
|
|
|
66
74
|
$ backlog-exporter COMMAND
|
|
67
75
|
running command...
|
|
68
76
|
$ backlog-exporter (--version)
|
|
69
|
-
backlog-exporter/0.
|
|
77
|
+
backlog-exporter/0.6.1 linux-x64 node-v24.3.0
|
|
70
78
|
$ backlog-exporter --help [COMMAND]
|
|
71
79
|
USAGE
|
|
72
80
|
$ backlog-exporter COMMAND
|
|
@@ -99,6 +107,12 @@ $ backlog-exporter document --domain example.backlog.jp --projectIdOrKey PROJECT
|
|
|
99
107
|
# 課題・Wiki・ドキュメントの一括エクスポート
|
|
100
108
|
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./backlog-data
|
|
101
109
|
|
|
110
|
+
# 特定のデータタイプのみをエクスポート(onlyフラグ)
|
|
111
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki
|
|
112
|
+
|
|
113
|
+
# 特定のデータタイプを除外してエクスポート(excludeフラグ)
|
|
114
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents
|
|
115
|
+
|
|
102
116
|
# データの更新
|
|
103
117
|
$ backlog-exporter update
|
|
104
118
|
```
|
|
@@ -127,6 +141,28 @@ $ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KE
|
|
|
127
141
|
|
|
128
142
|
エクスポートされた課題は、指定したディレクトリ内に Markdown ファイルとして保存されます。ファイル名は課題のキーに基づいて自動的に生成されます。
|
|
129
143
|
|
|
144
|
+
## カスタム属性の対応
|
|
145
|
+
|
|
146
|
+
課題のエクスポートでは、Backlogのカスタム属性も含めて出力されます:
|
|
147
|
+
|
|
148
|
+
### 対応している値の型
|
|
149
|
+
- **プリミティブ値**: 文字列、数値などの単純な値
|
|
150
|
+
- **配列値**: 複数選択のカスタム属性(カンマ区切りで表示)
|
|
151
|
+
- **オブジェクト値**: 単一選択のカスタム属性(name または value プロパティを使用)
|
|
152
|
+
|
|
153
|
+
### 表示形式
|
|
154
|
+
カスタム属性はMarkdownテーブル形式で表示され、改行やパイプ文字も適切に処理されます:
|
|
155
|
+
|
|
156
|
+
```markdown
|
|
157
|
+
## カスタム属性
|
|
158
|
+
|
|
159
|
+
| 属性名 | 値 |
|
|
160
|
+
|--------|----|
|
|
161
|
+
| 工数(エンジニア) | 3 |
|
|
162
|
+
| 担当チーム | フロントエンド, バックエンド |
|
|
163
|
+
| 詳細 | 実装内容<br>- 機能A<br>- 機能B |
|
|
164
|
+
```
|
|
165
|
+
|
|
130
166
|
# Wiki のエクスポート
|
|
131
167
|
|
|
132
168
|
`wiki`コマンドを使用すると、Backlog の Wiki ページを Markdown ファイルとしてエクスポートできます。
|
|
@@ -198,10 +234,44 @@ $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY
|
|
|
198
234
|
|
|
199
235
|
# 出力先を指定
|
|
200
236
|
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./backlog-data
|
|
237
|
+
|
|
238
|
+
# 特定のデータタイプのみをエクスポート(onlyフラグ)
|
|
239
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki
|
|
240
|
+
|
|
241
|
+
# 特定のデータタイプを除外してエクスポート(excludeフラグ)
|
|
242
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents
|
|
201
243
|
```
|
|
202
244
|
|
|
203
245
|
一括エクスポートでは、課題は`issues`ディレクトリに、Wiki は`wiki`ディレクトリに、ドキュメントは`documents`ディレクトリに保存されます。
|
|
204
246
|
|
|
247
|
+
## エクスポート対象の制御
|
|
248
|
+
|
|
249
|
+
`all`コマンドでは、以下のフラグを使用してエクスポート対象を制御できます:
|
|
250
|
+
|
|
251
|
+
### --only フラグ
|
|
252
|
+
特定のデータタイプのみをエクスポートします。カンマ区切りで複数指定可能です。
|
|
253
|
+
|
|
254
|
+
```sh
|
|
255
|
+
# 課題とWikiのみをエクスポート
|
|
256
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --only issues,wiki
|
|
257
|
+
|
|
258
|
+
# ドキュメントのみをエクスポート
|
|
259
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --only documents
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### --exclude フラグ
|
|
263
|
+
特定のデータタイプを除外してエクスポートします。カンマ区切りで複数指定可能です。
|
|
264
|
+
|
|
265
|
+
```sh
|
|
266
|
+
# ドキュメント以外(課題とWiki)をエクスポート
|
|
267
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --exclude documents
|
|
268
|
+
|
|
269
|
+
# 課題以外(WikiとDocuments)をエクスポート
|
|
270
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --exclude issues
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
**注意**: `--only`と`--exclude`フラグは同時に使用できません。どちらか一方を使用してください。
|
|
274
|
+
|
|
205
275
|
# データの更新
|
|
206
276
|
|
|
207
277
|
`update`コマンドを使用すると、既存のエクスポートデータを最新の状態に更新できます。このコマンドは、ディレクトリ内の`backlog-settings.json`ファイルを探索し、見つかったディレクトリでデータを更新します。
|
|
@@ -257,14 +327,16 @@ Backlogから課題・Wiki・ドキュメントを取得してMarkdownファイ
|
|
|
257
327
|
|
|
258
328
|
```
|
|
259
329
|
USAGE
|
|
260
|
-
$ backlog-exporter all --domain <value> --projectIdOrKey <value> [--apiKey <value>] [
|
|
261
|
-
<value>]
|
|
330
|
+
$ backlog-exporter all --domain <value> --projectIdOrKey <value> [--apiKey <value>] [--exclude <value>]
|
|
331
|
+
[-m <value>] [--only <value>] [-o <value>]
|
|
262
332
|
|
|
263
333
|
FLAGS
|
|
264
334
|
-m, --maxCount=<value> [default: 5000] 一度に取得する課題の最大数(デフォルト: 5000)
|
|
265
335
|
-o, --output=<value> 出力ディレクトリパス
|
|
266
336
|
--apiKey=<value> Backlog API key (環境変数 BACKLOG_API_KEY からも自動読み取り可能)
|
|
267
337
|
--domain=<value> (required) Backlog domain (e.g. example.backlog.jp)
|
|
338
|
+
--exclude=<value> Exclude the specified types, separated by commas (e.g., 'documents,wiki')
|
|
339
|
+
--only=<value> Export only the specified types, separated by commas (e.g., 'issues,wiki')
|
|
268
340
|
--projectIdOrKey=<value> (required) Backlog project ID or key
|
|
269
341
|
|
|
270
342
|
DESCRIPTION
|
|
@@ -277,11 +349,17 @@ EXAMPLES
|
|
|
277
349
|
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-project
|
|
278
350
|
指定したディレクトリに課題・Wiki・ドキュメントを保存する
|
|
279
351
|
|
|
352
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki
|
|
353
|
+
課題とWikiのみを取得する
|
|
354
|
+
|
|
355
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents
|
|
356
|
+
ドキュメント以外(課題とWiki)を取得する
|
|
357
|
+
|
|
280
358
|
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --maxCount 1000
|
|
281
359
|
最大1000件の課題を取得する(デフォルトは5000件)
|
|
282
360
|
```
|
|
283
361
|
|
|
284
|
-
_See code: [src/commands/all/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.
|
|
362
|
+
_See code: [src/commands/all/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.1/src/commands/all/index.ts)_
|
|
285
363
|
|
|
286
364
|
## `backlog-exporter document`
|
|
287
365
|
|
|
@@ -313,7 +391,7 @@ EXAMPLES
|
|
|
313
391
|
キーワード「仕様書」を含むドキュメントのみを取得する
|
|
314
392
|
```
|
|
315
393
|
|
|
316
|
-
_See code: [src/commands/document/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.
|
|
394
|
+
_See code: [src/commands/document/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.1/src/commands/document/index.ts)_
|
|
317
395
|
|
|
318
396
|
## `backlog-exporter help [COMMAND]`
|
|
319
397
|
|
|
@@ -369,7 +447,7 @@ EXAMPLES
|
|
|
369
447
|
最大10000件の課題を取得する(デフォルトは5000件)
|
|
370
448
|
```
|
|
371
449
|
|
|
372
|
-
_See code: [src/commands/issue/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.
|
|
450
|
+
_See code: [src/commands/issue/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.1/src/commands/issue/index.ts)_
|
|
373
451
|
|
|
374
452
|
## `backlog-exporter plugins`
|
|
375
453
|
|
|
@@ -699,7 +777,7 @@ EXAMPLES
|
|
|
699
777
|
指定したディレクトリの設定を使用して更新する
|
|
700
778
|
```
|
|
701
779
|
|
|
702
|
-
_See code: [src/commands/update/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.
|
|
780
|
+
_See code: [src/commands/update/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.1/src/commands/update/index.ts)_
|
|
703
781
|
|
|
704
782
|
## `backlog-exporter wiki`
|
|
705
783
|
|
|
@@ -726,7 +804,7 @@ EXAMPLES
|
|
|
726
804
|
指定したディレクトリにWikiを保存する
|
|
727
805
|
```
|
|
728
806
|
|
|
729
|
-
_See code: [src/commands/wiki/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.
|
|
807
|
+
_See code: [src/commands/wiki/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.1/src/commands/wiki/index.ts)_
|
|
730
808
|
<!-- commandsstop -->
|
|
731
809
|
|
|
732
810
|
# 出力形式
|
|
@@ -748,6 +826,15 @@ _See code: [src/commands/wiki/index.ts](https://github.com/ShuntaToda/backlog-ex
|
|
|
748
826
|
- 更新日時: 2023/01/02 15:30:45
|
|
749
827
|
- [Backlog Issue Link](https://example.backlog.jp/view/PROJ-123)
|
|
750
828
|
|
|
829
|
+
## カスタム属性
|
|
830
|
+
|
|
831
|
+
| 属性名 | 値 |
|
|
832
|
+
|--------|----|
|
|
833
|
+
| 工数(エンジニア) | 3 |
|
|
834
|
+
| 工数(PPO) | なし |
|
|
835
|
+
| 担当チーム | フロントエンド, バックエンド |
|
|
836
|
+
| 詳細 | 実装内容<br>- 機能A<br>- 機能B |
|
|
837
|
+
|
|
751
838
|
## 詳細
|
|
752
839
|
|
|
753
840
|
ここに課題の詳細説明が入ります。
|
|
@@ -822,3 +909,4 @@ Backlog の書式がそのまま保持されます。
|
|
|
822
909
|
- **階層構造の保持**: Wiki の階層構造を保持したエクスポート
|
|
823
910
|
- **キーワード検索**: ドキュメントの検索キーワード対応
|
|
824
911
|
- **差分更新**: 前回の更新以降に変更されたデータのみを更新
|
|
912
|
+
- **カスタム属性対応**: 課題のカスタム属性をテーブル形式で表示(配列・オブジェクト・プリミティブ値に対応)
|
|
@@ -5,7 +5,9 @@ export default class All extends Command {
|
|
|
5
5
|
static flags: {
|
|
6
6
|
apiKey: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
7
|
domain: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
exclude: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
9
|
maxCount: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
only: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
11
|
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
12
|
projectIdOrKey: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
13
|
};
|
|
@@ -15,6 +15,12 @@ export default class All extends Command {
|
|
|
15
15
|
`,
|
|
16
16
|
`<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-project
|
|
17
17
|
指定したディレクトリに課題・Wiki・ドキュメントを保存する
|
|
18
|
+
`,
|
|
19
|
+
`<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki
|
|
20
|
+
課題とWikiのみを取得する
|
|
21
|
+
`,
|
|
22
|
+
`<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents
|
|
23
|
+
ドキュメント以外(課題とWiki)を取得する
|
|
18
24
|
`,
|
|
19
25
|
`<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --maxCount 1000
|
|
20
26
|
最大1000件の課題を取得する(デフォルトは5000件)
|
|
@@ -29,12 +35,20 @@ export default class All extends Command {
|
|
|
29
35
|
description: 'Backlog domain (e.g. example.backlog.jp)',
|
|
30
36
|
required: true,
|
|
31
37
|
}),
|
|
38
|
+
exclude: Flags.string({
|
|
39
|
+
description: "Exclude the specified types, separated by commas (e.g., 'documents,wiki')",
|
|
40
|
+
required: false,
|
|
41
|
+
}),
|
|
32
42
|
maxCount: Flags.integer({
|
|
33
43
|
char: 'm',
|
|
34
44
|
default: 5000,
|
|
35
45
|
description: '一度に取得する課題の最大数(デフォルト: 5000)',
|
|
36
46
|
required: false,
|
|
37
47
|
}),
|
|
48
|
+
only: Flags.string({
|
|
49
|
+
description: "Export only the specified types, separated by commas (e.g., 'issues,wiki')",
|
|
50
|
+
required: false,
|
|
51
|
+
}),
|
|
38
52
|
output: Flags.string({
|
|
39
53
|
char: 'o',
|
|
40
54
|
description: '出力ディレクトリパス',
|
|
@@ -48,88 +62,123 @@ export default class All extends Command {
|
|
|
48
62
|
async run() {
|
|
49
63
|
const { flags } = await this.parse(All);
|
|
50
64
|
try {
|
|
51
|
-
const { domain, maxCount, projectIdOrKey } = flags;
|
|
65
|
+
const { domain, exclude, maxCount, only, projectIdOrKey } = flags;
|
|
52
66
|
const apiKey = flags.apiKey || getApiKey(this);
|
|
53
67
|
const outputRoot = flags.output || './backlog-data';
|
|
68
|
+
// Check for conflicting flags
|
|
69
|
+
if (only && exclude) {
|
|
70
|
+
this.error('Cannot use both --only and --exclude flags together. Please use only one.');
|
|
71
|
+
}
|
|
72
|
+
// Determine targets based on flags
|
|
73
|
+
let targets;
|
|
74
|
+
if (only) {
|
|
75
|
+
targets = only.split(',');
|
|
76
|
+
}
|
|
77
|
+
else if (exclude) {
|
|
78
|
+
const excludeTargets = exclude.split(',');
|
|
79
|
+
const allTargets = ['issues', 'wiki', 'documents'];
|
|
80
|
+
targets = allTargets.filter(target => !excludeTargets.includes(target));
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
targets = ['issues', 'wiki', 'documents'];
|
|
84
|
+
}
|
|
85
|
+
// Validate targets
|
|
86
|
+
const validTargets = ['issues', 'wiki', 'documents'];
|
|
87
|
+
const inputTargets = only ? only.split(',') : exclude ? exclude.split(',') : [];
|
|
88
|
+
for (const target of inputTargets) {
|
|
89
|
+
if (!validTargets.includes(target)) {
|
|
90
|
+
this.error(`Invalid target '${target}'. Available targets are: ${validTargets.join(', ')}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// Check if any targets remain after exclusion
|
|
94
|
+
if (targets.length === 0) {
|
|
95
|
+
this.error('No targets remaining after exclusion. Please specify valid targets to export.');
|
|
96
|
+
}
|
|
54
97
|
// 出力ディレクトリの作成
|
|
55
98
|
await createOutputDirectory(outputRoot);
|
|
56
99
|
// プロジェクトキーからプロジェクトIDを取得
|
|
57
100
|
const projectId = await validateAndGetProjectId(domain, projectIdOrKey, apiKey);
|
|
58
101
|
this.log(`プロジェクトID: ${projectId} を使用します`);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
102
|
+
if (targets.includes('issues')) {
|
|
103
|
+
// 課題の出力ディレクトリ
|
|
104
|
+
const issueOutput = path.join(outputRoot, 'issues');
|
|
105
|
+
await createOutputDirectory(issueOutput);
|
|
106
|
+
// 課題フォルダに設定ファイルを保存
|
|
107
|
+
await updateSettings(issueOutput, {
|
|
108
|
+
apiKey,
|
|
109
|
+
domain,
|
|
110
|
+
folderType: FolderType.ISSUE,
|
|
111
|
+
outputDir: issueOutput,
|
|
112
|
+
projectIdOrKey,
|
|
113
|
+
});
|
|
114
|
+
// 課題の取得と保存
|
|
115
|
+
this.log('課題の取得を開始します...');
|
|
116
|
+
await downloadIssues(this, {
|
|
117
|
+
apiKey,
|
|
118
|
+
count: maxCount,
|
|
119
|
+
domain,
|
|
120
|
+
outputDir: issueOutput,
|
|
121
|
+
projectId,
|
|
122
|
+
});
|
|
123
|
+
// 課題フォルダの最終更新日時を更新
|
|
124
|
+
await updateSettings(issueOutput, {
|
|
125
|
+
lastUpdated: new Date().toISOString(),
|
|
126
|
+
});
|
|
127
|
+
this.log('課題の取得が完了しました');
|
|
128
|
+
}
|
|
129
|
+
if (targets.includes('wiki')) {
|
|
130
|
+
// Wikiの出力ディレクトリ
|
|
131
|
+
const wikiOutput = path.join(outputRoot, 'wiki');
|
|
132
|
+
await createOutputDirectory(wikiOutput);
|
|
133
|
+
// Wikiフォルダに設定ファイルを保存
|
|
134
|
+
await updateSettings(wikiOutput, {
|
|
135
|
+
apiKey,
|
|
136
|
+
domain,
|
|
137
|
+
folderType: FolderType.WIKI,
|
|
138
|
+
outputDir: wikiOutput,
|
|
139
|
+
projectIdOrKey,
|
|
140
|
+
});
|
|
141
|
+
// Wikiの取得と保存
|
|
142
|
+
this.log('Wikiの取得を開始します...');
|
|
143
|
+
await downloadWikis(this, {
|
|
144
|
+
apiKey,
|
|
145
|
+
domain,
|
|
146
|
+
outputDir: wikiOutput,
|
|
147
|
+
projectIdOrKey,
|
|
148
|
+
});
|
|
149
|
+
// Wikiフォルダの最終更新日時を更新
|
|
150
|
+
await updateSettings(wikiOutput, {
|
|
151
|
+
lastUpdated: new Date().toISOString(),
|
|
152
|
+
});
|
|
153
|
+
this.log('Wikiの取得が完了しました');
|
|
154
|
+
}
|
|
155
|
+
if (targets.includes('documents')) {
|
|
156
|
+
// ドキュメントの出力ディレクトリ
|
|
157
|
+
const documentOutput = path.join(outputRoot, 'documents');
|
|
158
|
+
await createOutputDirectory(documentOutput);
|
|
159
|
+
// ドキュメントフォルダに設定ファイルを保存
|
|
160
|
+
await updateSettings(documentOutput, {
|
|
161
|
+
apiKey,
|
|
162
|
+
domain,
|
|
163
|
+
folderType: FolderType.DOCUMENT,
|
|
164
|
+
outputDir: documentOutput,
|
|
165
|
+
projectIdOrKey,
|
|
166
|
+
});
|
|
167
|
+
// ドキュメントの取得と保存
|
|
168
|
+
this.log('ドキュメントの取得を開始します...');
|
|
169
|
+
await downloadDocuments(this, {
|
|
170
|
+
apiKey,
|
|
171
|
+
domain,
|
|
172
|
+
outputDir: documentOutput,
|
|
173
|
+
projectId,
|
|
174
|
+
projectIdOrKey,
|
|
175
|
+
});
|
|
176
|
+
// ドキュメントフォルダの最終更新日時を更新
|
|
177
|
+
await updateSettings(documentOutput, {
|
|
178
|
+
lastUpdated: new Date().toISOString(),
|
|
179
|
+
});
|
|
180
|
+
this.log('ドキュメントの取得が完了しました');
|
|
181
|
+
}
|
|
133
182
|
this.log('すべてのデータの取得が完了しました!');
|
|
134
183
|
}
|
|
135
184
|
catch (error) {
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import { Command } from '@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
* カスタム属性セクションを作成する
|
|
4
|
+
* @param customFields カスタム属性の配列
|
|
5
|
+
* @returns Markdownテーブル形式のカスタム属性セクション
|
|
6
|
+
*/
|
|
7
|
+
export declare function createCustomFieldsSection(customFields?: Array<{
|
|
8
|
+
id: number;
|
|
9
|
+
name: string;
|
|
10
|
+
value: unknown;
|
|
11
|
+
}>): string;
|
|
2
12
|
/**
|
|
3
13
|
* Backlogから課題をダウンロードする
|
|
4
14
|
* @param command コマンドインスタンス
|
|
5
15
|
* @param options 課題ダウンロードのオプション
|
|
16
|
+
* @param options.apiKey Backlog API key
|
|
17
|
+
* @param options.count 取得する課題の最大数
|
|
18
|
+
* @param options.domain Backlogのドメイン
|
|
19
|
+
* @param options.lastUpdated 最終更新日時
|
|
20
|
+
* @param options.outputDir 出力ディレクトリ
|
|
21
|
+
* @param options.projectId プロジェクトID
|
|
22
|
+
* @param options.statusId ステータスID
|
|
6
23
|
*/
|
|
7
24
|
export declare function downloadIssues(command: Command, options: {
|
|
8
25
|
apiKey: string;
|
|
@@ -17,6 +34,11 @@ export declare function downloadIssues(command: Command, options: {
|
|
|
17
34
|
* BacklogからWikiをダウンロードする
|
|
18
35
|
* @param command コマンドインスタンス
|
|
19
36
|
* @param options Wikiダウンロードのオプション
|
|
37
|
+
* @param options.apiKey Backlog API key
|
|
38
|
+
* @param options.domain Backlogのドメイン
|
|
39
|
+
* @param options.lastUpdated 最終更新日時
|
|
40
|
+
* @param options.outputDir 出力ディレクトリ
|
|
41
|
+
* @param options.projectIdOrKey プロジェクトIDまたはキー
|
|
20
42
|
*/
|
|
21
43
|
export declare function downloadWikis(command: Command, options: {
|
|
22
44
|
apiKey: string;
|
|
@@ -29,6 +51,13 @@ export declare function downloadWikis(command: Command, options: {
|
|
|
29
51
|
* Backlogからドキュメントをダウンロードする
|
|
30
52
|
* @param command コマンドインスタンス
|
|
31
53
|
* @param options ドキュメントダウンロードのオプション
|
|
54
|
+
* @param options.apiKey Backlog API key
|
|
55
|
+
* @param options.domain Backlogのドメイン
|
|
56
|
+
* @param options.keyword キーワードフィルター
|
|
57
|
+
* @param options.lastUpdated 最終更新日時
|
|
58
|
+
* @param options.outputDir 出力ディレクトリ
|
|
59
|
+
* @param options.projectId プロジェクトID
|
|
60
|
+
* @param options.projectIdOrKey プロジェクトIDまたはキー
|
|
32
61
|
*/
|
|
33
62
|
export declare function downloadDocuments(command: Command, options: {
|
|
34
63
|
apiKey: string;
|
|
@@ -5,10 +5,54 @@ import process from 'node:process';
|
|
|
5
5
|
import { sanitizeFileName, sanitizeWikiFileName } from './common.js';
|
|
6
6
|
import { appendLog } from './log.js';
|
|
7
7
|
import { RateLimiter } from './sleep.js';
|
|
8
|
+
/**
|
|
9
|
+
* カスタム属性セクションを作成する
|
|
10
|
+
* @param customFields カスタム属性の配列
|
|
11
|
+
* @returns Markdownテーブル形式のカスタム属性セクション
|
|
12
|
+
*/
|
|
13
|
+
export function createCustomFieldsSection(customFields) {
|
|
14
|
+
if (!customFields || customFields.length === 0) {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
let customFieldsSection = '\n\n## カスタム属性\n\n| 属性名 | 値 |\n|--------|----|\n';
|
|
18
|
+
for (const customField of customFields) {
|
|
19
|
+
let fieldValue = 'なし';
|
|
20
|
+
if (customField.value !== null && customField.value !== undefined) {
|
|
21
|
+
if (Array.isArray(customField.value)) {
|
|
22
|
+
// 配列の場合(複数選択など)
|
|
23
|
+
fieldValue = customField.value
|
|
24
|
+
.map(item => item.name || item.value || String(item))
|
|
25
|
+
.join(', ');
|
|
26
|
+
}
|
|
27
|
+
else if (typeof customField.value === 'object' && customField.value !== null) {
|
|
28
|
+
// オブジェクトの場合(単一選択など)
|
|
29
|
+
const valueObj = customField.value;
|
|
30
|
+
fieldValue = valueObj.name || valueObj.value || String(customField.value);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
// プリミティブ値の場合
|
|
34
|
+
fieldValue = String(customField.value);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// テーブル内では改行をHTMLの<br>タグに変換し、パイプ文字をエスケープ
|
|
38
|
+
const escapedFieldValue = fieldValue
|
|
39
|
+
.replaceAll('|', String.raw `\|`)
|
|
40
|
+
.replaceAll('\n', '<br>');
|
|
41
|
+
customFieldsSection += `| ${customField.name} | ${escapedFieldValue} |\n`;
|
|
42
|
+
}
|
|
43
|
+
return customFieldsSection;
|
|
44
|
+
}
|
|
8
45
|
/**
|
|
9
46
|
* Backlogから課題をダウンロードする
|
|
10
47
|
* @param command コマンドインスタンス
|
|
11
48
|
* @param options 課題ダウンロードのオプション
|
|
49
|
+
* @param options.apiKey Backlog API key
|
|
50
|
+
* @param options.count 取得する課題の最大数
|
|
51
|
+
* @param options.domain Backlogのドメイン
|
|
52
|
+
* @param options.lastUpdated 最終更新日時
|
|
53
|
+
* @param options.outputDir 出力ディレクトリ
|
|
54
|
+
* @param options.projectId プロジェクトID
|
|
55
|
+
* @param options.statusId ステータスID
|
|
12
56
|
*/
|
|
13
57
|
export async function downloadIssues(command, options) {
|
|
14
58
|
const baseUrl = `https://${options.domain}/api/v2`;
|
|
@@ -114,6 +158,8 @@ export async function downloadIssues(command, options) {
|
|
|
114
158
|
// 年ごとのフォルダ内にMarkdownファイルを保存
|
|
115
159
|
const issueFileName = `${sanitizeFileName(issue.summary)}.md`;
|
|
116
160
|
const issueFilePath = path.join(yearDirPath, issueFileName);
|
|
161
|
+
// カスタム属性セクションを作成
|
|
162
|
+
const customFieldsSection = createCustomFieldsSection(issue.customFields);
|
|
117
163
|
// Markdownファイルに書き込む
|
|
118
164
|
const assigneeName = issue.assignee ? issue.assignee.name : '未割り当て';
|
|
119
165
|
const markdownContent = `# ${issue.summary}
|
|
@@ -125,7 +171,7 @@ export async function downloadIssues(command, options) {
|
|
|
125
171
|
- 担当者: ${assigneeName}
|
|
126
172
|
- 作成日時: ${new Date(issue.created).toLocaleString('ja-JP')}
|
|
127
173
|
- 更新日時: ${new Date(issue.updated).toLocaleString('ja-JP')}
|
|
128
|
-
- [Backlog Issue Link](${backlogIssueUrl})
|
|
174
|
+
- [Backlog Issue Link](${backlogIssueUrl})${customFieldsSection}
|
|
129
175
|
|
|
130
176
|
## 詳細
|
|
131
177
|
${issue.description || '詳細情報なし'}${commentsSection}`;
|
|
@@ -176,6 +222,11 @@ async function fetchAllCommentsForIssue({ apiKey, baseUrl, command, issueKey, ra
|
|
|
176
222
|
* BacklogからWikiをダウンロードする
|
|
177
223
|
* @param command コマンドインスタンス
|
|
178
224
|
* @param options Wikiダウンロードのオプション
|
|
225
|
+
* @param options.apiKey Backlog API key
|
|
226
|
+
* @param options.domain Backlogのドメイン
|
|
227
|
+
* @param options.lastUpdated 最終更新日時
|
|
228
|
+
* @param options.outputDir 出力ディレクトリ
|
|
229
|
+
* @param options.projectIdOrKey プロジェクトIDまたはキー
|
|
179
230
|
*/
|
|
180
231
|
export async function downloadWikis(command, options) {
|
|
181
232
|
const baseUrl = `https://${options.domain}/api/v2`;
|
|
@@ -259,6 +310,13 @@ export async function downloadWikis(command, options) {
|
|
|
259
310
|
* Backlogからドキュメントをダウンロードする
|
|
260
311
|
* @param command コマンドインスタンス
|
|
261
312
|
* @param options ドキュメントダウンロードのオプション
|
|
313
|
+
* @param options.apiKey Backlog API key
|
|
314
|
+
* @param options.domain Backlogのドメイン
|
|
315
|
+
* @param options.keyword キーワードフィルター
|
|
316
|
+
* @param options.lastUpdated 最終更新日時
|
|
317
|
+
* @param options.outputDir 出力ディレクトリ
|
|
318
|
+
* @param options.projectId プロジェクトID
|
|
319
|
+
* @param options.projectIdOrKey プロジェクトIDまたはキー
|
|
262
320
|
*/
|
|
263
321
|
export async function downloadDocuments(command, options) {
|
|
264
322
|
const baseUrl = `https://${options.domain}/api/v2`;
|
package/oclif.manifest.json
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
"examples": [
|
|
8
8
|
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\n課題・Wiki・ドキュメントをMarkdownファイルとして保存する\n",
|
|
9
9
|
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-project\n指定したディレクトリに課題・Wiki・ドキュメントを保存する\n",
|
|
10
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki\n課題とWikiのみを取得する\n",
|
|
11
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents\nドキュメント以外(課題とWiki)を取得する\n",
|
|
10
12
|
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --maxCount 1000\n最大1000件の課題を取得する(デフォルトは5000件)\n"
|
|
11
13
|
],
|
|
12
14
|
"flags": {
|
|
@@ -26,6 +28,14 @@
|
|
|
26
28
|
"multiple": false,
|
|
27
29
|
"type": "option"
|
|
28
30
|
},
|
|
31
|
+
"exclude": {
|
|
32
|
+
"description": "Exclude the specified types, separated by commas (e.g., 'documents,wiki')",
|
|
33
|
+
"name": "exclude",
|
|
34
|
+
"required": false,
|
|
35
|
+
"hasDynamicHelp": false,
|
|
36
|
+
"multiple": false,
|
|
37
|
+
"type": "option"
|
|
38
|
+
},
|
|
29
39
|
"maxCount": {
|
|
30
40
|
"char": "m",
|
|
31
41
|
"description": "一度に取得する課題の最大数(デフォルト: 5000)",
|
|
@@ -36,6 +46,14 @@
|
|
|
36
46
|
"multiple": false,
|
|
37
47
|
"type": "option"
|
|
38
48
|
},
|
|
49
|
+
"only": {
|
|
50
|
+
"description": "Export only the specified types, separated by commas (e.g., 'issues,wiki')",
|
|
51
|
+
"name": "only",
|
|
52
|
+
"required": false,
|
|
53
|
+
"hasDynamicHelp": false,
|
|
54
|
+
"multiple": false,
|
|
55
|
+
"type": "option"
|
|
56
|
+
},
|
|
39
57
|
"output": {
|
|
40
58
|
"char": "o",
|
|
41
59
|
"description": "出力ディレクトリパス",
|
|
@@ -70,15 +88,14 @@
|
|
|
70
88
|
"index.js"
|
|
71
89
|
]
|
|
72
90
|
},
|
|
73
|
-
"
|
|
91
|
+
"document": {
|
|
74
92
|
"aliases": [],
|
|
75
93
|
"args": {},
|
|
76
|
-
"description": "Backlog
|
|
94
|
+
"description": "Backlogからドキュメントを取得してMarkdownファイルとして保存する",
|
|
77
95
|
"examples": [
|
|
78
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\n
|
|
79
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-
|
|
80
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --
|
|
81
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --maxCount 10000\n最大10000件の課題を取得する(デフォルトは5000件)\n"
|
|
96
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\nドキュメントをMarkdownファイルとして保存する\n",
|
|
97
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-documents\n指定したディレクトリにドキュメントを保存する\n",
|
|
98
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --keyword 仕様書\nキーワード「仕様書」を含むドキュメントのみを取得する\n"
|
|
82
99
|
],
|
|
83
100
|
"flags": {
|
|
84
101
|
"apiKey": {
|
|
@@ -97,12 +114,10 @@
|
|
|
97
114
|
"multiple": false,
|
|
98
115
|
"type": "option"
|
|
99
116
|
},
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"name": "maxCount",
|
|
117
|
+
"keyword": {
|
|
118
|
+
"description": "検索キーワード",
|
|
119
|
+
"name": "keyword",
|
|
104
120
|
"required": false,
|
|
105
|
-
"default": 5000,
|
|
106
121
|
"hasDynamicHelp": false,
|
|
107
122
|
"multiple": false,
|
|
108
123
|
"type": "option"
|
|
@@ -123,19 +138,11 @@
|
|
|
123
138
|
"hasDynamicHelp": false,
|
|
124
139
|
"multiple": false,
|
|
125
140
|
"type": "option"
|
|
126
|
-
},
|
|
127
|
-
"statusId": {
|
|
128
|
-
"description": "ステータスID(カンマ区切りで複数指定可能)",
|
|
129
|
-
"name": "statusId",
|
|
130
|
-
"required": false,
|
|
131
|
-
"hasDynamicHelp": false,
|
|
132
|
-
"multiple": false,
|
|
133
|
-
"type": "option"
|
|
134
141
|
}
|
|
135
142
|
},
|
|
136
143
|
"hasDynamicHelp": false,
|
|
137
144
|
"hiddenAliases": [],
|
|
138
|
-
"id": "
|
|
145
|
+
"id": "document",
|
|
139
146
|
"pluginAlias": "backlog-exporter",
|
|
140
147
|
"pluginName": "backlog-exporter",
|
|
141
148
|
"pluginType": "core",
|
|
@@ -145,18 +152,19 @@
|
|
|
145
152
|
"relativePath": [
|
|
146
153
|
"dist",
|
|
147
154
|
"commands",
|
|
148
|
-
"
|
|
155
|
+
"document",
|
|
149
156
|
"index.js"
|
|
150
157
|
]
|
|
151
158
|
},
|
|
152
|
-
"
|
|
159
|
+
"issue": {
|
|
153
160
|
"aliases": [],
|
|
154
161
|
"args": {},
|
|
155
|
-
"description": "Backlog
|
|
162
|
+
"description": "Backlogから課題を取得してMarkdownファイルとして保存する",
|
|
156
163
|
"examples": [
|
|
157
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\n
|
|
158
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-
|
|
159
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --
|
|
164
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\n課題をMarkdownファイルとして保存する\n",
|
|
165
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-issues\n指定したディレクトリに課題を保存する\n",
|
|
166
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --statusId 1,2,3\n指定したステータスIDの課題のみを取得する\n",
|
|
167
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --maxCount 10000\n最大10000件の課題を取得する(デフォルトは5000件)\n"
|
|
160
168
|
],
|
|
161
169
|
"flags": {
|
|
162
170
|
"apiKey": {
|
|
@@ -175,10 +183,12 @@
|
|
|
175
183
|
"multiple": false,
|
|
176
184
|
"type": "option"
|
|
177
185
|
},
|
|
178
|
-
"
|
|
179
|
-
"
|
|
180
|
-
"
|
|
186
|
+
"maxCount": {
|
|
187
|
+
"char": "m",
|
|
188
|
+
"description": "一度に取得する課題の最大数(デフォルト: 5000)",
|
|
189
|
+
"name": "maxCount",
|
|
181
190
|
"required": false,
|
|
191
|
+
"default": 5000,
|
|
182
192
|
"hasDynamicHelp": false,
|
|
183
193
|
"multiple": false,
|
|
184
194
|
"type": "option"
|
|
@@ -199,11 +209,19 @@
|
|
|
199
209
|
"hasDynamicHelp": false,
|
|
200
210
|
"multiple": false,
|
|
201
211
|
"type": "option"
|
|
212
|
+
},
|
|
213
|
+
"statusId": {
|
|
214
|
+
"description": "ステータスID(カンマ区切りで複数指定可能)",
|
|
215
|
+
"name": "statusId",
|
|
216
|
+
"required": false,
|
|
217
|
+
"hasDynamicHelp": false,
|
|
218
|
+
"multiple": false,
|
|
219
|
+
"type": "option"
|
|
202
220
|
}
|
|
203
221
|
},
|
|
204
222
|
"hasDynamicHelp": false,
|
|
205
223
|
"hiddenAliases": [],
|
|
206
|
-
"id": "
|
|
224
|
+
"id": "issue",
|
|
207
225
|
"pluginAlias": "backlog-exporter",
|
|
208
226
|
"pluginName": "backlog-exporter",
|
|
209
227
|
"pluginType": "core",
|
|
@@ -213,7 +231,7 @@
|
|
|
213
231
|
"relativePath": [
|
|
214
232
|
"dist",
|
|
215
233
|
"commands",
|
|
216
|
-
"
|
|
234
|
+
"issue",
|
|
217
235
|
"index.js"
|
|
218
236
|
]
|
|
219
237
|
},
|
|
@@ -364,5 +382,5 @@
|
|
|
364
382
|
]
|
|
365
383
|
}
|
|
366
384
|
},
|
|
367
|
-
"version": "0.
|
|
385
|
+
"version": "0.6.1"
|
|
368
386
|
}
|