@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/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # dooray-cli
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@bifos/dooray-cli.svg)](https://www.npmjs.com/package/@bifos/dooray-cli)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@bifos/dooray-cli.svg)](https://www.npmjs.com/package/@bifos/dooray-cli)
3
5
  [![CI](https://github.com/jon890/dooray-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/jon890/dooray-cli/actions/workflows/ci.yml)
6
+ [![license](https://img.shields.io/npm/l/@bifos/dooray-cli.svg)](https://github.com/jon890/dooray-cli/blob/main/LICENSE)
4
7
 
5
8
  NHN Dooray REST API를 래핑한 CLI 도구입니다. 터미널과 AI 에이전트 환경에서 Dooray 업무를 관리할 수 있습니다.
6
9
 
@@ -118,6 +121,16 @@ dooray post edit <project> 42 --title "새 제목" --body "새 본문"
118
121
  dooray post edit <project> 42 --body-file ./updated.md
119
122
  ```
120
123
 
124
+ #### 본문 변경 시 attachment 보호
125
+
126
+ `post edit` 와 `post comment edit` 는 본문을 통째로 replace 합니다. 새 본문에 기존 inline attachment markdown(`![](/files/<id>)`)이 빠져 있으면 stderr 에 경고를 띄우고 (y/N) 로 물어봅니다.
127
+
128
+ 자동화 환경 (pipe / non-TTY) 에서는 그대로 abort 됩니다. 의도한 변경이면 `--no-confirm` 으로 다시 실행하세요.
129
+
130
+ ```bash
131
+ echo "new body" | dooray post comment edit <project> <post-number> <comment-id> --body - --no-confirm
132
+ ```
133
+
121
134
  ### 댓글
122
135
 
123
136
  ```bash
@@ -128,30 +141,26 @@ dooray post comment add <project> 42 --body-file ./comment.md
128
141
 
129
142
  > table 출력의 Creator 컬럼은 프로젝트 멤버 캐시로 자동 enrich되며, `--json`은 raw 응답을 유지한다 (ADR-021).
130
143
 
131
- #### 멘션 (comment add / comment edit)
132
-
133
- `--mention <name>` (반복), `--mention-group <code>` (반복)으로 본문 앞에 멘션 마크업을 자동 prepend한다.
144
+ #### 멘션·내부 링크 자동 삽입
134
145
 
135
146
  ```bash
136
- # 멤버 멘션 1명
137
- dooray post comment add P 1 --mention 홍길동 --body "확인 부탁드립니다"
138
-
139
- # 여러
140
- dooray post comment add P 1 --mention 홍길동 --mention 김철수 --body "..."
147
+ # 댓글에 멤버·그룹 멘션
148
+ dooray post comment add <project> <post-number> \
149
+ --body "주간 리포트 첨부" \
150
+ --mention "홍길동" \
151
+ --mention-group <project>/dev
141
152
 
142
- # 그룹 멘션
143
- dooray post comment add P 1 --mention-group 개발 --body "검토 요청"
144
-
145
- # 멤버 + 그룹 혼합
146
- dooray post comment add P 1 \
147
- --mention 홍길동 \
148
- --mention-group 개발 \
149
- --body "검토 부탁드립니다"
153
+ # 본문에 다른 업무 링크 append
154
+ dooray post create <project> \
155
+ --title "이번 주 작업" \
156
+ --body "관련 이슈" \
157
+ --link-task <project>/470
150
158
 
151
- # comment edit에도 동일 옵션 사용 가능
152
- dooray post comment edit P 1 <commentId> --mention 홍길동 --body "수정 내용"
159
+ # 송신 합성 결과 미리보기
160
+ dooray post comment add <project> <post-number> --body "..." --link-task <project>/470 --dry-run
153
161
  ```
154
162
 
163
+ > `--mention` / `--mention-group` / `--link-task` / `--dry-run` 은 `post create`, `post edit`, `post comment add`, `post comment edit` 4 명령 모두 지원.
155
164
  > 이전 버전 캐시는 orgId가 없으므로 첫 호출 시 자동 갱신됩니다 (또는 `dooray cache clear`).
156
165
 
157
166
  #### comment list 필터 옵션
@@ -187,6 +196,18 @@ dooray post comment latest <project> 42 -n 3
187
196
  dooray post comment latest --url <dooray-url>
188
197
  ```
189
198
 
199
+ #### comment get
200
+
201
+ 단일 댓글 ID 로 본문·메타·attachments 를 직접 fetch. `comment list` 후 jq 필터링 없이 바로 사용할 수 있어 자동화 파이프라인에 적합하다.
202
+
203
+ ```bash
204
+ # 단일 댓글 조회 (자동화 친화)
205
+ dooray post comment get <project> <post-number> <comment-id> --json | jq -r '.body.content'
206
+
207
+ # ID / URL 모드
208
+ dooray post comment get --id <postId> --comment-id <commentId> --json
209
+ ```
210
+
190
211
  ### 상태 변경
191
212
 
192
213
  ```bash