@bifos/dooray-cli 0.6.0 → 0.7.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bifos/dooray-cli",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "CLI tool for Dooray project management — AI agent & terminal friendly",
5
5
  "keywords": [
6
6
  "dooray",
@@ -66,6 +66,7 @@ dooray doctor # 설정 검증
66
66
  | 업무 워크플로우 변경 | `dooray post workflow <project> <number> <workflow>` |
67
67
  | 댓글 조회 | `dooray post comment list <project> <number>` — `--sort asc\|desc`, `--reverse`, `--latest <n>`, `--since <iso>`, `--from-author <name>` 필터 지원. table 출력은 Creator 이름 자동 채움, `--json`은 raw 유지 (ADR-021) |
68
68
  | 최신 댓글 조회 | `dooray post comment latest <project> <number>` — 최신 댓글 1개 빠른 조회. `-n <N>`으로 N개 지정 |
69
+ | 단일 댓글 조회 | `dooray post comment get <project> <number> <comment-id> --json` — 단일 댓글 본문·메타·attachments 직접 fetch. `comment list` 후 jq 필터 우회 불필요. `--id <postId> --comment-id <id>` / `--url <url> --comment-id <id>` 모드 지원 |
69
70
  | 댓글 추가 | `dooray post comment add <project> <number> --body "..."` 또는 `--body-file <path>` |
70
71
  | 댓글 수정 | `dooray post comment edit <project> <number> <comment-id> --body "..."` 또는 `--body-file <path>` |
71
72
  | 댓글 삭제 | `dooray post comment delete <project> <number> <comment-id>` |
@@ -181,6 +182,27 @@ dooray wiki pages <project> --json
181
182
  dooray wiki page get <project> <pageId> --json
182
183
  ```
183
184
 
185
+ ## 단일 댓글 본문 fetch
186
+
187
+ `post comment get <project> <post-number> <comment-id> --json` 으로 단일 댓글의 본문 + attachments 를 곧장 fetch. `comment list` 후 jq 필터링 우회 불필요.
188
+
189
+ 본문 patch 흐름:
190
+ 1. `dooray post comment get <p> <n> <id> --json | jq -r '.body.content' > current.md`
191
+ 2. (편집)
192
+ 3. `dooray post comment edit <p> <n> <id> --body-file current.md --no-confirm` (attachment guard 통과)
193
+
194
+ ---
195
+
196
+ ## 본문 수정 (attachment 보호)
197
+
198
+ `post edit` / `post comment edit` 는 full-replace 방식이다. 자동화에서는 다음 중 하나를 선택:
199
+
200
+ 1. **기존 attachment 보존**:
201
+ - `post edit` 수정 전: `dooray post get <project> <post-number> --json` 으로 `.body.content` 에서 `/files/<id>` 패턴 추출
202
+ - `post comment edit` 수정 전: `dooray post comment list <project> <post-number> --json` 으로 해당 댓글 본문에서 `/files/<id>` 패턴 추출
203
+ 추출한 markdown reference 를 새 본문에 그대로 포함하여 전달
204
+ 2. **명시적 제거**: attachment 가 더 이상 필요 없다고 판단하면 `--no-confirm` 으로 진행. 누락이 의도한 결과임을 명시
205
+
184
206
  ---
185
207
 
186
208
  ## 커맨드 상세
@@ -279,9 +301,14 @@ dooray post comment latest <project> <number>
279
301
 
280
302
  ---
281
303
 
282
- ## 멘션 자동 작성 (post comment add/edit)
304
+ ## 멘션·링크 자동 삽입 (first-class)
305
+
306
+ `post create`, `post edit`, `post comment add`, `post comment edit` 모두 지원:
283
307
 
284
- `--mention <name>` (반복) 또는 `--mention-group <code>` (반복)으로 본문 앞에 멘션 마크업을 자동 prepend한다. 아래 "Dooray 마크다운 링크 형식" 섹션의 URL 형식을 자동 출력한다.
308
+ - `--mention <name>` (반복) 이름으로 멤버 resolve dooray:// markdown prepend
309
+ - `--mention-group <code>` (반복) — 그룹 코드로 resolve
310
+ - `--link-task <project>/<number>` (반복) — 다른 업무 link 를 본문 끝에 append. 19자리 postId 도 가능
311
+ - `--dry-run` — API 호출 없이 합성 결과만 stdout. CI / 자동화 검증용
285
312
 
286
313
  ```bash
287
314
  dooray post comment add P 1 --mention 홍길동 --mention-group 개발 --body "..."
@@ -290,7 +317,7 @@ dooray post comment add P 1 --mention 홍길동 --mention-group 개발 --body ".
290
317
 
291
318
  - 이름 부분일치 지원 (모호하면 에러 + 후보 목록 출력)
292
319
  - 멤버 먼저, 그룹 다음 순서 고정
293
- - comment edit에도 동일 옵션 사용 (`$EDITOR` 모드에서는 EDITOR 진입 전에 prepend)
320
+ - interactive (`$EDITOR`) 모드의 `post edit` mention/link-task 무시 + stderr 경고
294
321
 
295
322
  ## Dooray 마크다운 링크 형식 (멤버·그룹·업무 멘션)
296
323