@proggarapsody/bitbottle 1.21.0 → 1.23.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.
Files changed (2) hide show
  1. package/README.md +98 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -76,7 +76,7 @@ Credentials are stored in `~/.config/bitbottle/hosts.yml`. Inside a git repo wit
76
76
  |---|---|
77
77
  | `auth` | `login` `logout` `status` `token` `refresh` |
78
78
  | `pr` | `list` `view` `create` `merge` `approve` `unapprove` `diff` `checkout` `edit` `decline` `reopen` `ready` `request-review` `comment` |
79
- | `repo` | `list` `view` `create` `delete` `clone` `set-default` `rename` `fork` _(Cloud)_ |
79
+ | `repo` | `list` `view` `create` `delete` `clone` `set-default` `rename` `fork` _(Cloud)_ `file get` `tree` |
80
80
  | `branch` | `list` `create` `delete` `checkout` |
81
81
  | `tag` | `list` `create` `delete` |
82
82
  | `webhook` | `list` `view` `create` `delete` |
@@ -84,7 +84,7 @@ Credentials are stored in `~/.config/bitbottle/hosts.yml`. Inside a git repo wit
84
84
  | `pipeline` | `list` `view` `run` _(Cloud only)_ |
85
85
  | `workspace` | `list` _(Cloud only)_ |
86
86
  | `project` | `list WORKSPACE` _(Cloud only)_ |
87
- | `issue` | `list` `view` `create` `close` _(Cloud only)_ |
87
+ | `issue` | `list` `view` `create` `close` `edit` `reopen` `assign` `comment {list\|add\|edit\|delete}` _(Cloud only)_ |
88
88
  | `search` | `code QUERY` _(Cloud only)_ |
89
89
  | `api` | Raw REST passthrough with pagination, `--jq`, variable expansion |
90
90
  | `alias` | Custom command shortcuts |
@@ -122,6 +122,11 @@ bitbottle pr request-review 42 --reviewer alice --reviewer bob
122
122
  # Decline / reopen (reopen is Bitbucket Server / DC only)
123
123
  bitbottle pr decline 42
124
124
  bitbottle pr reopen 42
125
+
126
+ # Read review comments — general + inline (file:line) anchors and replies
127
+ bitbottle pr comment list 42 # all comments; LOCATION column shows path:line for inline
128
+ bitbottle pr comment list 42 --inline # only inline review comments
129
+ bitbottle pr comment list 42 --json id,inline,parentId,resolved,updatedAt
125
130
  ```
126
131
 
127
132
  ### Repos & Branches
@@ -223,6 +228,33 @@ bitbottle repo fork myworkspace/my-service --into otherws --name my-fork
223
228
  Data Center, which has no fork primitive in its REST API. Both `rename` and
224
229
  `fork` accept `--json fields` and `--jq expr` for structured output.
225
230
 
231
+ ### Reading source at a ref
232
+
233
+ Read file content and directory listings at any ref (branch, tag, commit
234
+ hash) without cloning. Both backends; the bytes round-trip cleanly so
235
+ binary files survive `--out`.
236
+
237
+ ```bash
238
+ # Read a file at a ref — straight to stdout
239
+ bitbottle repo file get MYPROJ/my-service README.md --ref main
240
+
241
+ # Pin a tag and write to disk (binary-safe)
242
+ bitbottle repo file get MYPROJ/my-service logo.png --ref v1.2.0 --out logo.png
243
+
244
+ # List a directory at a ref. PATH defaults to the repo root.
245
+ bitbottle repo tree MYPROJ/my-service --ref main
246
+ bitbottle repo tree MYPROJ/my-service cmd --ref main
247
+
248
+ # Structured output for scripts and agents
249
+ bitbottle repo tree MYPROJ/my-service --ref main --json path,type,size
250
+ bitbottle repo tree MYPROJ/my-service --ref main --jq '.[]|select(.type=="dir").path'
251
+ ```
252
+
253
+ `type` is normalised to `file` or `dir` across both backends. Submodules
254
+ surface as `dir` (with the submodule pointer in `hash`) so renderers can
255
+ recurse uniformly without a special case. The MCP equivalents are
256
+ `get_file_content` and `list_tree`.
257
+
226
258
  ### Workspaces & Projects (Cloud only)
227
259
 
228
260
  ```bash
@@ -260,6 +292,70 @@ runs. Bitbucket Server / Data Center has no first-class code-search
260
292
  REST endpoint; invocations against a Server host return the typed
261
293
  `host.unsupported` error.
262
294
 
295
+ ### Code Insights _(Bitbucket Server / DC only)_
296
+
297
+ Post build / quality / security analysis results as structured annotations
298
+ on commits. Requires Bitbucket Server / Data Center.
299
+
300
+ ```bash
301
+ # Create or update a report (upsert by key)
302
+ bitbottle --hostname git.example.com code-insights report set \
303
+ MYPROJ/my-service abc123def456 my-scanner \
304
+ --title "Security Scan" --result PASS \
305
+ --report-type SECURITY --reporter "semgrep"
306
+
307
+ # List all reports for a commit
308
+ bitbottle --hostname git.example.com code-insights report list \
309
+ MYPROJ/my-service abc123def456
310
+
311
+ # View a single report as JSON
312
+ bitbottle --hostname git.example.com code-insights report view \
313
+ MYPROJ/my-service abc123def456 my-scanner \
314
+ --json key,title,result,details
315
+
316
+ # Bulk-add annotations from a JSON file
317
+ bitbottle --hostname git.example.com code-insights annotation add \
318
+ MYPROJ/my-service abc123def456 my-scanner \
319
+ --from-json @findings.json
320
+
321
+ # Single annotation
322
+ bitbottle --hostname git.example.com code-insights annotation add \
323
+ MYPROJ/my-service abc123def456 my-scanner \
324
+ --path src/main.go --line 42 --severity HIGH --type BUG \
325
+ --message "Potential null dereference"
326
+
327
+ # List annotations for a report
328
+ bitbottle --hostname git.example.com code-insights annotation list \
329
+ MYPROJ/my-service abc123def456 my-scanner --json path,severity,message
330
+
331
+ # Delete a report and all its annotations
332
+ bitbottle --hostname git.example.com code-insights report delete \
333
+ MYPROJ/my-service abc123def456 my-scanner
334
+ ```
335
+
336
+ #### Merge checks (experimental)
337
+
338
+ Configure a Code Insights report as a required gate for PR merges. The
339
+ underlying API is partly undocumented — commands are marked experimental.
340
+
341
+ ```bash
342
+ # Require the "my-scanner" report to pass before merging
343
+ bitbottle --hostname git.example.com code-insights merge-check set \
344
+ MYPROJ/my-service required-scan \
345
+ --report-key my-scanner --must-pass --min-severity MEDIUM
346
+
347
+ # Inspect the current merge-check configuration
348
+ bitbottle --hostname git.example.com code-insights merge-check get \
349
+ MYPROJ/my-service required-scan
350
+
351
+ # Remove the merge check
352
+ bitbottle --hostname git.example.com code-insights merge-check delete \
353
+ MYPROJ/my-service required-scan
354
+ ```
355
+
356
+ Invoking any `code-insights` command against a Bitbucket Cloud host returns
357
+ the typed `host.unsupported` error.
358
+
263
359
  ### Raw API
264
360
 
265
361
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proggarapsody/bitbottle",
3
- "version": "1.21.0",
3
+ "version": "1.23.0",
4
4
  "description": "Bitbucket CLI for Server/Data Center and Cloud — npm wrapper for bitbottle",
5
5
  "keywords": [
6
6
  "mcp",