@proggarapsody/bitbottle 1.22.0 → 1.24.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 +77 -1
- 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 |
|
|
@@ -127,6 +127,18 @@ bitbottle pr reopen 42
|
|
|
127
127
|
bitbottle pr comment list 42 # all comments; LOCATION column shows path:line for inline
|
|
128
128
|
bitbottle pr comment list 42 --inline # only inline review comments
|
|
129
129
|
bitbottle pr comment list 42 --json id,inline,parentId,resolved,updatedAt
|
|
130
|
+
|
|
131
|
+
# Write review comments — general, inline, replies
|
|
132
|
+
bitbottle pr comment add 42 --body "LGTM!" # general comment
|
|
133
|
+
bitbottle pr comment add 42 --inline pkg/foo.go:88 --body "rename?" # inline (new side, single line)
|
|
134
|
+
bitbottle pr comment add 42 --inline pkg/foo.go:10-15 --body "..." # multi-line range (Cloud only)
|
|
135
|
+
bitbottle pr comment add 42 --inline pkg/foo.go:7 --side old --body ".." # comment on the old / removed side
|
|
136
|
+
bitbottle pr comment add 42 --parent 1234 --body "agreed" # reply to an existing thread
|
|
137
|
+
|
|
138
|
+
# Edit / delete / resolve a comment
|
|
139
|
+
bitbottle pr comment edit 42 1234 --body "updated"
|
|
140
|
+
bitbottle pr comment delete 42 1234
|
|
141
|
+
bitbottle pr comment resolve 42 1234 # Bitbucket Cloud only
|
|
130
142
|
```
|
|
131
143
|
|
|
132
144
|
### Repos & Branches
|
|
@@ -292,6 +304,70 @@ runs. Bitbucket Server / Data Center has no first-class code-search
|
|
|
292
304
|
REST endpoint; invocations against a Server host return the typed
|
|
293
305
|
`host.unsupported` error.
|
|
294
306
|
|
|
307
|
+
### Code Insights _(Bitbucket Server / DC only)_
|
|
308
|
+
|
|
309
|
+
Post build / quality / security analysis results as structured annotations
|
|
310
|
+
on commits. Requires Bitbucket Server / Data Center.
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
# Create or update a report (upsert by key)
|
|
314
|
+
bitbottle --hostname git.example.com code-insights report set \
|
|
315
|
+
MYPROJ/my-service abc123def456 my-scanner \
|
|
316
|
+
--title "Security Scan" --result PASS \
|
|
317
|
+
--report-type SECURITY --reporter "semgrep"
|
|
318
|
+
|
|
319
|
+
# List all reports for a commit
|
|
320
|
+
bitbottle --hostname git.example.com code-insights report list \
|
|
321
|
+
MYPROJ/my-service abc123def456
|
|
322
|
+
|
|
323
|
+
# View a single report as JSON
|
|
324
|
+
bitbottle --hostname git.example.com code-insights report view \
|
|
325
|
+
MYPROJ/my-service abc123def456 my-scanner \
|
|
326
|
+
--json key,title,result,details
|
|
327
|
+
|
|
328
|
+
# Bulk-add annotations from a JSON file
|
|
329
|
+
bitbottle --hostname git.example.com code-insights annotation add \
|
|
330
|
+
MYPROJ/my-service abc123def456 my-scanner \
|
|
331
|
+
--from-json @findings.json
|
|
332
|
+
|
|
333
|
+
# Single annotation
|
|
334
|
+
bitbottle --hostname git.example.com code-insights annotation add \
|
|
335
|
+
MYPROJ/my-service abc123def456 my-scanner \
|
|
336
|
+
--path src/main.go --line 42 --severity HIGH --type BUG \
|
|
337
|
+
--message "Potential null dereference"
|
|
338
|
+
|
|
339
|
+
# List annotations for a report
|
|
340
|
+
bitbottle --hostname git.example.com code-insights annotation list \
|
|
341
|
+
MYPROJ/my-service abc123def456 my-scanner --json path,severity,message
|
|
342
|
+
|
|
343
|
+
# Delete a report and all its annotations
|
|
344
|
+
bitbottle --hostname git.example.com code-insights report delete \
|
|
345
|
+
MYPROJ/my-service abc123def456 my-scanner
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
#### Merge checks (experimental)
|
|
349
|
+
|
|
350
|
+
Configure a Code Insights report as a required gate for PR merges. The
|
|
351
|
+
underlying API is partly undocumented — commands are marked experimental.
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
# Require the "my-scanner" report to pass before merging
|
|
355
|
+
bitbottle --hostname git.example.com code-insights merge-check set \
|
|
356
|
+
MYPROJ/my-service required-scan \
|
|
357
|
+
--report-key my-scanner --must-pass --min-severity MEDIUM
|
|
358
|
+
|
|
359
|
+
# Inspect the current merge-check configuration
|
|
360
|
+
bitbottle --hostname git.example.com code-insights merge-check get \
|
|
361
|
+
MYPROJ/my-service required-scan
|
|
362
|
+
|
|
363
|
+
# Remove the merge check
|
|
364
|
+
bitbottle --hostname git.example.com code-insights merge-check delete \
|
|
365
|
+
MYPROJ/my-service required-scan
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Invoking any `code-insights` command against a Bitbucket Cloud host returns
|
|
369
|
+
the typed `host.unsupported` error.
|
|
370
|
+
|
|
295
371
|
### Raw API
|
|
296
372
|
|
|
297
373
|
```bash
|