bitbucket-tool-cli 0.1.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 (3) hide show
  1. package/README.md +83 -0
  2. package/dist/index.js +12998 -0
  3. package/package.json +22 -0
package/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # bitbucket-tool-cli
2
+
3
+ CLI for [Bitbucket Cloud](https://bitbucket.org) pull request management.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npx bitbucket-tool-cli pr:list --workspace my-ws --repo my-repo
9
+ ```
10
+
11
+ Or install globally:
12
+
13
+ ```bash
14
+ npm install -g bitbucket-tool-cli
15
+ ```
16
+
17
+ ## Commands
18
+
19
+ | Command | Description |
20
+ |---------|-------------|
21
+ | `pr:list` | List pull requests (alias: `prs`) |
22
+ | `pr:create <source> <title> [description]` | Create a pull request |
23
+ | `pr:update <pr-id>` | Update or close a pull request |
24
+ | `pr:comment <pr-id> <comment>` | Add a comment to a pull request |
25
+ | `pr:comments <pr-id>` | Get all comments on a pull request |
26
+
27
+ ### pr:list
28
+
29
+ ```bash
30
+ bitbucket-tool-cli pr:list --workspace my-ws --repo my-repo
31
+ bitbucket-tool-cli pr:list --state MERGED
32
+ ```
33
+
34
+ Options:
35
+ - `-s, --state <state>` — Filter by state: `OPEN`, `MERGED`, `DECLINED`, `SUPERSEDED` (default: `OPEN`)
36
+
37
+ ### pr:create
38
+
39
+ ```bash
40
+ bitbucket-tool-cli pr:create feature/login "Add login page" "Implements OAuth login" \
41
+ --workspace my-ws --repo my-repo
42
+ ```
43
+
44
+ Options:
45
+ - `-d, --destination <branch>` — Destination branch (default: `main`)
46
+
47
+ ### pr:update
48
+
49
+ ```bash
50
+ bitbucket-tool-cli pr:update 42 --title "New title" --workspace my-ws --repo my-repo
51
+ bitbucket-tool-cli pr:update 42 --close
52
+ ```
53
+
54
+ Options:
55
+ - `-t, --title <title>` — Update PR title
56
+ - `-d, --description <desc>` — Update PR description
57
+ - `--destination <branch>` — Update destination branch
58
+ - `--close` — Close/decline the pull request
59
+
60
+ ### pr:comment
61
+
62
+ ```bash
63
+ bitbucket-tool-cli pr:comment 42 "LGTM" --workspace my-ws --repo my-repo
64
+ ```
65
+
66
+ ### pr:comments
67
+
68
+ ```bash
69
+ bitbucket-tool-cli pr:comments 42 --workspace my-ws --repo my-repo
70
+ ```
71
+
72
+ ## Authentication
73
+
74
+ Set one of:
75
+
76
+ - **API token**: `BITBUCKET_TOKEN` env var
77
+ - **OAuth 2.0**: `BITBUCKET_OAUTH_CLIENT_ID` + `BITBUCKET_OAUTH_CLIENT_SECRET`
78
+
79
+ Optionally set `BITBUCKET_WORKSPACE` as a default workspace.
80
+
81
+ ## License
82
+
83
+ MIT