@bifos/dooray-cli 0.7.0 → 0.9.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/README.md +91 -0
- package/dist/index.js +529 -168
- package/package.json +1 -1
- package/skills/dooray-cli/SKILL.md +110 -1
package/package.json
CHANGED
|
@@ -55,12 +55,14 @@ dooray doctor # 설정 검증
|
|
|
55
55
|
| 프로젝트 멤버 보기 | `dooray project members <project>` 또는 `dooray member list <project>` (이름·organizationMemberId) |
|
|
56
56
|
| 프로젝트 멤버 그룹 목록 | `dooray project groups <project>` (ID / Code) |
|
|
57
57
|
| 프로젝트 태그 목록 | `dooray project tags <project>` (ID / Color / Name / Group / Mandatory) |
|
|
58
|
+
| 프로젝트 템플릿 목록 | `dooray project templates <project>` (id / templateName) |
|
|
58
59
|
| 멤버 상세 (organizationMemberId) | `dooray member get <organizationMemberId>` (cache 우회, ADR-021) |
|
|
59
60
|
| organization 전체 멤버 검색 | `dooray member search <keyword>` (이름 기본), `--email`(이메일 exact), `--user-code`(사번 like), `--user-code-exact`(사번 exact), `--page`/`--size` |
|
|
60
61
|
| 업무 목록 조회 | `dooray post list <project>` |
|
|
61
62
|
| 업무 검색 | `dooray post search <project> "<keyword>"` |
|
|
62
63
|
| 업무 상세 보기 | `dooray post get <project> <number>` |
|
|
63
64
|
| 업무 생성 | `dooray post create <project> --title "..." --body "..."` 또는 `--body-file <path>` (`--body`와 `--body-file`은 동시 사용 불가, `--tag`/`--parent`/`--workflow`/`--milestone` 지원) |
|
|
65
|
+
| 템플릿 기반 업무 생성 | `dooray post create <project> --template <name\|id>` — body/users/tags 자동 채움 (사용자 옵션 우선 override, ADR-027) |
|
|
64
66
|
| 업무 제목/본문 수정 | `dooray post edit <project> <number> --title "..." --body "..."` 또는 `--body-file <path>` |
|
|
65
67
|
| 업무 완료 처리 | `dooray post done <project> <number>` |
|
|
66
68
|
| 업무 워크플로우 변경 | `dooray post workflow <project> <number> <workflow>` |
|
|
@@ -92,6 +94,13 @@ dooray doctor # 설정 검증
|
|
|
92
94
|
| 댓글 파일 업로드 | `dooray post comment file upload <project> <number> <comment-id> <path>` |
|
|
93
95
|
| 댓글 파일 다운로드 | `dooray post comment file download <project> <number> <comment-id> <file-id>` |
|
|
94
96
|
| 댓글 파일 삭제 | `dooray post comment file delete <project> <number> <comment-id> <file-id> --yes` |
|
|
97
|
+
| 참조자(cc) 멤버/그룹 추가 | `dooray post edit <project> <number> --cc-group <code>` — 기존 참조자 유지 + 그룹 추가 (dedupe, ADR-025) |
|
|
98
|
+
| 참조자 전체 교체 | `dooray post edit <project> <number> --cc-clear --cc <name>` — 기존 참조자 비우고 신규 멤버만 |
|
|
99
|
+
| 신규 업무 + 그룹 cc | `dooray post create <project> --title "..." --cc-group <code>` — 생성 시 그룹 참조자 포함 |
|
|
100
|
+
| 상위 업무 설정/변경 | `dooray post edit <project> <number> --title "<원제목>" --parent <ref>` — `<ref>` 는 `<project>/<number>` 또는 raw postId. `--title` 미동반 시 interactive 모드로 진입해 무시. unset 미지원 (Issue #60) |
|
|
101
|
+
| `dooray post edit --id <postId> --tag <name>` | 태그 추가 (반복, dedupe) |
|
|
102
|
+
| `dooray post edit --id <postId> --tag-clear --tag <name>` | 태그 전체 교체 |
|
|
103
|
+
| `dooray post edit --id <postId> --tag-remove <name>` | 특정 태그 제거 |
|
|
95
104
|
|
|
96
105
|
> **제목 옵션 네이밍**: `post` 와 `wiki page` 모두 `--title` 표준. `post`의 `--subject`는 deprecated alias로 당분간 동작하되, 새 코드에서는 `--title` 사용을 권장.
|
|
97
106
|
|
|
@@ -103,7 +112,7 @@ CLI로 처리 **불가능한** 작업. 아래 항목을 요청받으면 웹 UI
|
|
|
103
112
|
|
|
104
113
|
| 작업 | 대체 경로 | 근거 |
|
|
105
114
|
|---|---|---|
|
|
106
|
-
| 위키 페이지 **삭제** | 웹 UI (`https://{tenant}.dooray.com/wiki/...`) | Dooray REST API에 해당 엔드포인트 없음 (위키 댓글·첨부파일 삭제는 있지만 페이지 자체는
|
|
115
|
+
| 위키 페이지 **삭제** | 웹 UI (`https://{tenant}.dooray.com/wiki/...`) | Dooray REST API에 해당 엔드포인트 없음 (위키 댓글·첨부파일 삭제는 있지만 페이지 자체는 없음 — ADR 또는 Dooray 공식 API 문서 미제공) |
|
|
107
116
|
| 프로젝트 삭제 | 웹 UI (admin 페이지) | API 미지원 |
|
|
108
117
|
|
|
109
118
|
위키 페이지를 잘못 만든 경우(테스트/중복) **soft delete(빈 제목·본문) 우회 금지** — 페이지가 트리에 남아 사용자 혼란 유발.
|
|
@@ -279,6 +288,91 @@ dooray post edit <project> <number> --body "새 본문"
|
|
|
279
288
|
dooray post edit <project> <number> --title "새 제목" --body-file ./updated.md
|
|
280
289
|
```
|
|
281
290
|
|
|
291
|
+
### 참조자(cc) / 담당자(to) 변경 — 멤버 · 그룹 (ADR-025)
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
# 기존 참조자 유지 + 그룹 추가 (dedupe: organizationMemberId / projectMemberGroupId)
|
|
295
|
+
dooray post edit <project> <number> --cc-group dev-team
|
|
296
|
+
|
|
297
|
+
# 기존 참조자 전부 비우고 신규 멤버만
|
|
298
|
+
dooray post edit <project> <number> --cc-clear --cc 홍길동
|
|
299
|
+
|
|
300
|
+
# 담당자(to)도 동일 패턴: --to / --to-group / --to-clear
|
|
301
|
+
dooray post edit <project> <number> --to 김철수 --to-group qa-team
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
dry-run 으로 변경 결과 미리보기 (API 호출 없음):
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
dooray post edit --id "$POST_ID" --cc-group qa-team --dry-run --json \
|
|
308
|
+
| jq '.users.cc'
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
> interactive (`$EDITOR`) 모드에서는 위 옵션이 무시되고 stderr 경고가 출력됩니다.
|
|
312
|
+
|
|
313
|
+
## 동명이인 우회 — 이메일 / memberId 직접 (Issue #58)
|
|
314
|
+
|
|
315
|
+
이름이 동일한 멤버가 여러 명이라 `--cc 홍길동` 이 모호로 실패할 때:
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
# 1) 이메일로 우회
|
|
319
|
+
dooray post edit --id "$POST_ID" --cc user.specific@example.com
|
|
320
|
+
|
|
321
|
+
# 2) 사전에 member search 로 ID 확보 후 직접
|
|
322
|
+
MEMBER_ID=$(dooray member search 홍길동 --json | jq -r '.[] | select(.externalEmailAddress=="user.specific@example.com") | .id')
|
|
323
|
+
dooray post edit --id "$POST_ID" --cc "$MEMBER_ID"
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
`--to` / `--mention` 동일 분기 (resolveMember 인프라). 분기 규칙: `^\d{15,}$` → memberId / 이메일 정규형 → searchMembers exact / 그 외 → 이름 부분일치.
|
|
327
|
+
|
|
328
|
+
## 신규 업무 생성 후 그룹 cc 첨부 (ADR-025)
|
|
329
|
+
|
|
330
|
+
audit 리포트 분석 → 신규 업무 생성 → 후속으로 특정 그룹을 참조에 추가하는 자동화 패턴:
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
# 1. 신규 업무 생성 (그룹 cc 포함)
|
|
334
|
+
POST_ID=$(dooray post create <project> \
|
|
335
|
+
--title "주간 audit 리포트" \
|
|
336
|
+
--body-file ./report.md \
|
|
337
|
+
--cc-group dev-team \
|
|
338
|
+
--json | jq -r '.id')
|
|
339
|
+
|
|
340
|
+
# 2. (필요 시) 후속으로 cc 추가
|
|
341
|
+
dooray post edit --id "$POST_ID" --cc-group qa-team
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## 자식 업무 먼저 → 후속 부모 지정 (Issue #60)
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
# 1. 자식 업무 생성 (parent 모르고)
|
|
350
|
+
CHILD_ID=$(dooray post create <project> --title "subtask A" --json | jq -r '.id')
|
|
351
|
+
|
|
352
|
+
# 2. 부모 결정 후 후속 지정
|
|
353
|
+
dooray post edit --id "$CHILD_ID" --title "subtask A" --parent <project>/<parent-number>
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**한계** (cmux-browser spike 결과): Dooray API 가 `unset-parent-post` 미제공 → CLI 로 parent 해제 불가. 필요 시 웹 UI 에서 처리.
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## 태그 사후 분류 자동화 (Issue #66)
|
|
361
|
+
|
|
362
|
+
분류 분석 결과를 받아 태그를 재분류하는 자동화는 단독 호출 패턴이 효율적:
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
# 분석 스크립트가 분류한 태그 이름을 cli 로 적용 — body fetch 불요
|
|
366
|
+
POST_ID=$(...)
|
|
367
|
+
CATEGORY=$(...)
|
|
368
|
+
dooray post edit --id "$POST_ID" --tag "분류: $CATEGORY"
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
태그만 변경하는 시나리오에서 `--title` / `--body` 강제 없음.
|
|
372
|
+
mandatory 그룹은 친절한 에러 메시지로 안내 (ADR-019).
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
282
376
|
### 댓글 추가 (non-interactive)
|
|
283
377
|
|
|
284
378
|
```bash
|
|
@@ -389,6 +483,21 @@ CLI 에러 발생 시 복구 방법:
|
|
|
389
483
|
|
|
390
484
|
---
|
|
391
485
|
|
|
486
|
+
## 정형 task 자동화 (Issue #59 / ADR-027)
|
|
487
|
+
|
|
488
|
+
매주 같은 형식의 task 를 만드는 자동화는 템플릿 + override 패턴이 효율적:
|
|
489
|
+
|
|
490
|
+
```bash
|
|
491
|
+
# 매주 월요일 실행되는 cron — "주간 릴리스 체크" 템플릿으로 자동 생성
|
|
492
|
+
TODAY=$(date +%Y-%m-%d)
|
|
493
|
+
POST_ID=$(dooray post create <project> \
|
|
494
|
+
--template "주간 릴리스 체크" \
|
|
495
|
+
--title "주간 릴리스 체크 — $TODAY" \
|
|
496
|
+
--json | jq -r '.id')
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
템플릿 본문의 `${year}` / `${month}` 등 매크로는 Dooray 가 자동 치환 (`interpolation=true` 기본). 사용자 정의 변수는 미지원 — 필요 시 client 측 string replace 로 처리.
|
|
500
|
+
|
|
392
501
|
## 캐시
|
|
393
502
|
|
|
394
503
|
프로젝트, 멤버, 워크플로우, 위키 정보는 `~/.dooray/cache/`에 캐시된다.
|