@proggarapsody/bitbottle 1.22.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 +65 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -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 |
@@ -292,6 +292,70 @@ runs. Bitbucket Server / Data Center has no first-class code-search
292
292
  REST endpoint; invocations against a Server host return the typed
293
293
  `host.unsupported` error.
294
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
+
295
359
  ### Raw API
296
360
 
297
361
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proggarapsody/bitbottle",
3
- "version": "1.22.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",