@proggarapsody/bitbottle 1.14.3 → 1.16.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 +66 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -76,9 +76,10 @@ 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` `ready` `request-review` `comment` |
79
- | `repo` | `list` `view` `create` `delete` `clone` `set-default` |
79
+ | `repo` | `list` `view` `create` `delete` `clone` `set-default` `rename` `fork` _(Cloud)_ |
80
80
  | `branch` | `list` `create` `delete` `checkout` |
81
81
  | `tag` | `list` `create` `delete` |
82
+ | `webhook` | `list` `view` `create` `delete` |
82
83
  | `commit` | `log` `view` |
83
84
  | `pipeline` | `list` `view` `run` _(Cloud only)_ |
84
85
  | `api` | Raw REST passthrough with pagination, `--jq`, variable expansion |
@@ -129,11 +130,72 @@ bitbottle branch delete MYPROJ/my-service feature/x
129
130
  ### Pipelines _(Cloud only)_
130
131
 
131
132
  ```bash
132
- bitbottle pipeline list MYWORKSPACE/my-service
133
- bitbottle pipeline run MYWORKSPACE/my-service --branch main
134
- bitbottle pipeline view MYWORKSPACE/my-service {uuid} --web
133
+ bitbottle pipeline list MYWORKSPACE/my-service
134
+ bitbottle pipeline run MYWORKSPACE/my-service --branch main
135
+ bitbottle pipeline view MYWORKSPACE/my-service {uuid} --web
136
+
137
+ # Drill into a run:
138
+ bitbottle pipeline steps MYWORKSPACE/my-service {pipeline-uuid}
139
+ bitbottle pipeline logs MYWORKSPACE/my-service {pipeline-uuid} {step-uuid}
140
+
141
+ # Repository-level pipeline variables (upsert by KEY):
142
+ bitbottle pipeline variable list MYWORKSPACE/my-service
143
+ bitbottle pipeline variable set MYWORKSPACE/my-service DEPLOY_ENV prod
144
+ echo "$TOKEN" | bitbottle pipeline variable set MYWORKSPACE/my-service \
145
+ API_TOKEN --body=- --secured
146
+ bitbottle pipeline variable delete MYWORKSPACE/my-service DEPLOY_ENV --confirm
135
147
  ```
136
148
 
149
+ Secured variables redact their value on read (TTY column shows
150
+ `<secured>`, JSON `value` shows `"<secured>"`). Use `--body=-` to read
151
+ the value from stdin so the secret never touches shell history.
152
+
153
+ ### Webhooks
154
+
155
+ ```bash
156
+ bitbottle webhook list MYPROJ/my-service
157
+ bitbottle webhook view MYPROJ/my-service {id}
158
+
159
+ # Create
160
+ bitbottle webhook create MYPROJ/my-service \
161
+ --url https://hooks.example.com/bb \
162
+ --events 'repo:push,pullrequest:created'
163
+
164
+ # With shared secret from stdin (keeps secret out of shell history)
165
+ echo "$WEBHOOK_SECRET" | bitbottle webhook create MYPROJ/my-service \
166
+ --url https://hooks.example.com/bb \
167
+ --events 'repo:push' \
168
+ --secret -
169
+
170
+ # Delete (destructive — --confirm required when not interactive)
171
+ bitbottle webhook delete MYPROJ/my-service {id} --confirm
172
+ ```
173
+
174
+ Event keys differ between backends:
175
+ - **Cloud** uses `repo:push`, `pullrequest:created`, `pullrequest:approved`, …
176
+ - **Server/DC** uses `repo:refs_changed`, `pr:opened`, `pr:merged`, …
177
+
178
+ `--secret` accepts the raw value, `-` to read from stdin, or `@PATH` to read
179
+ from a file. Trailing newlines from stdin / file are trimmed. Webhook
180
+ secrets are write-only — neither backend returns them on read.
181
+
182
+ ### Repo extras
183
+
184
+ ```bash
185
+ # Rename (both backends — slug derives from new name on Cloud).
186
+ # --confirm is required on non-TTY because the slug change breaks existing
187
+ # clones' origin URL — run `git remote set-url origin ...` after.
188
+ bitbottle repo rename MYPROJ/my-service my-service-v2 --confirm
189
+
190
+ # Fork into another workspace (Bitbucket Cloud only)
191
+ bitbottle repo fork myworkspace/my-service --into otherws
192
+ bitbottle repo fork myworkspace/my-service --into otherws --name my-fork
193
+ ```
194
+
195
+ `repo fork` returns a typed unsupported-capability error on Bitbucket Server /
196
+ Data Center, which has no fork primitive in its REST API. Both `rename` and
197
+ `fork` accept `--json fields` and `--jq expr` for structured output.
198
+
137
199
  ### Raw API
138
200
 
139
201
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proggarapsody/bitbottle",
3
- "version": "1.14.3",
3
+ "version": "1.16.0",
4
4
  "description": "Bitbucket CLI for Server/Data Center and Cloud — npm wrapper for bitbottle",
5
5
  "keywords": [
6
6
  "mcp",