bitbucket-mcp-server 1.0.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/LICENSE +15 -0
- package/README.md +236 -0
- package/build/bitbucket-api.d.ts +163 -0
- package/build/bitbucket-api.js +230 -0
- package/build/bitbucket-api.js.map +1 -0
- package/build/bitbucket-api.test.d.ts +1 -0
- package/build/bitbucket-api.test.js +203 -0
- package/build/bitbucket-api.test.js.map +1 -0
- package/build/cache.d.ts +150 -0
- package/build/cache.js +361 -0
- package/build/cache.js.map +1 -0
- package/build/config.d.ts +102 -0
- package/build/config.js +199 -0
- package/build/config.js.map +1 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +790 -0
- package/build/index.js.map +1 -0
- package/build/metrics.d.ts +81 -0
- package/build/metrics.js +199 -0
- package/build/metrics.js.map +1 -0
- package/build/pipelines.d.ts +1 -0
- package/build/pipelines.js +2 -0
- package/build/pipelines.js.map +1 -0
- package/build/rate-limiting.d.ts +53 -0
- package/build/rate-limiting.js +268 -0
- package/build/rate-limiting.js.map +1 -0
- package/build/validation.d.ts +7 -0
- package/build/validation.js +40 -0
- package/build/validation.js.map +1 -0
- package/build/validation.test.d.ts +1 -0
- package/build/validation.test.js +59 -0
- package/build/validation.test.js.map +1 -0
- package/build/webhooks.d.ts +168 -0
- package/build/webhooks.js +305 -0
- package/build/webhooks.js.map +1 -0
- package/package.json +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, William Lin
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# Bitbucket MCP Server
|
|
2
|
+
|
|
3
|
+
A Model Context Protocol (MCP) server that provides tools for interacting with Bitbucket repositories, pull requests, issues, and more.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
This MCP server provides the following tools for Bitbucket integration:
|
|
8
|
+
|
|
9
|
+
### Repository Management
|
|
10
|
+
- **list-repositories**: List repositories in a Bitbucket workspace
|
|
11
|
+
- **get-repository**: Get detailed information about a specific repository
|
|
12
|
+
|
|
13
|
+
### Pull Requests
|
|
14
|
+
- **list-pull-requests**: List pull requests for a repository with filtering options
|
|
15
|
+
- **get-pull-request**: Get detailed information about a specific pull request
|
|
16
|
+
- **get-pr-diff**: Get the diff/changes of a specific pull request
|
|
17
|
+
|
|
18
|
+
### Issues
|
|
19
|
+
- **list-issues**: List issues for a repository with state and kind filtering
|
|
20
|
+
|
|
21
|
+
### Source Code
|
|
22
|
+
- **list-branches**: List all branches in a repository
|
|
23
|
+
- **get-commits**: Get recent commits with optional branch filtering
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
1. Clone or download this repository
|
|
28
|
+
2. Install dependencies:
|
|
29
|
+
```bash
|
|
30
|
+
npm install
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
3. Build the project:
|
|
34
|
+
```bash
|
|
35
|
+
npm run build
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Configuration
|
|
39
|
+
|
|
40
|
+
### Environment Variables
|
|
41
|
+
|
|
42
|
+
For private repositories and advanced features, set these environment variables:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
export BITBUCKET_USERNAME="your-username"
|
|
46
|
+
export BITBUCKET_APP_PASSWORD="your-app-password"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
To create an app password:
|
|
50
|
+
1. Go to Bitbucket Settings → Personal Bitbucket settings → App passwords
|
|
51
|
+
2. Create a new app password with appropriate permissions:
|
|
52
|
+
- Repositories: Read
|
|
53
|
+
- Pull requests: Read
|
|
54
|
+
- Issues: Read
|
|
55
|
+
- Account: Read
|
|
56
|
+
|
|
57
|
+
### MCP Client Configuration
|
|
58
|
+
|
|
59
|
+
Add this server to your MCP client configuration. For Claude Desktop, add to your `claude_desktop_config.json`:
|
|
60
|
+
|
|
61
|
+
#### macOS/Linux
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"mcpServers": {
|
|
65
|
+
"bitbucket": {
|
|
66
|
+
"command": "node",
|
|
67
|
+
"args": ["/ABSOLUTE/PATH/TO/bitbucket_mcp/build/index.js"],
|
|
68
|
+
"env": {
|
|
69
|
+
"BITBUCKET_USERNAME": "your-username",
|
|
70
|
+
"BITBUCKET_APP_PASSWORD": "your-app-password"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### Windows
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"mcpServers": {
|
|
81
|
+
"bitbucket": {
|
|
82
|
+
"command": "node",
|
|
83
|
+
"args": ["C:\\ABSOLUTE\\PATH\\TO\\bitbucket_mcp\\build\\index.js"],
|
|
84
|
+
"env": {
|
|
85
|
+
"BITBUCKET_USERNAME": "your-username",
|
|
86
|
+
"BITBUCKET_APP_PASSWORD": "your-app-password"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Usage Examples
|
|
94
|
+
|
|
95
|
+
### List Repositories
|
|
96
|
+
```
|
|
97
|
+
List all repositories in the 'myworkspace' workspace
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Get Repository Details
|
|
101
|
+
```
|
|
102
|
+
Get details for the repository 'myworkspace/myrepo'
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### List Pull Requests
|
|
106
|
+
```
|
|
107
|
+
Show all open pull requests for myworkspace/myrepo
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Get Pull Request Details
|
|
111
|
+
```
|
|
112
|
+
Get detailed information about pull request #123 in myworkspace/myrepo
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### List Issues
|
|
116
|
+
```
|
|
117
|
+
Show all open bugs in myworkspace/myrepo
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Get Recent Commits
|
|
121
|
+
```
|
|
122
|
+
Show the last 5 commits on the main branch of myworkspace/myrepo
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Tool Reference
|
|
126
|
+
|
|
127
|
+
### list-repositories
|
|
128
|
+
Lists repositories in a Bitbucket workspace.
|
|
129
|
+
|
|
130
|
+
**Parameters:**
|
|
131
|
+
- `workspace` (required): Bitbucket workspace name
|
|
132
|
+
- `role` (optional): Filter by user role (owner, admin, contributor, member)
|
|
133
|
+
- `sort` (optional): Sort by (created_on, updated_on, name, size)
|
|
134
|
+
|
|
135
|
+
### get-repository
|
|
136
|
+
Gets detailed information about a specific repository.
|
|
137
|
+
|
|
138
|
+
**Parameters:**
|
|
139
|
+
- `workspace` (required): Bitbucket workspace name
|
|
140
|
+
- `repo_slug` (required): Repository name/slug
|
|
141
|
+
|
|
142
|
+
### list-pull-requests
|
|
143
|
+
Lists pull requests for a repository.
|
|
144
|
+
|
|
145
|
+
**Parameters:**
|
|
146
|
+
- `workspace` (required): Bitbucket workspace name
|
|
147
|
+
- `repo_slug` (required): Repository name/slug
|
|
148
|
+
- `state` (optional): Filter by state (OPEN, MERGED, DECLINED, SUPERSEDED)
|
|
149
|
+
|
|
150
|
+
### get-pull-request
|
|
151
|
+
Gets detailed information about a specific pull request.
|
|
152
|
+
|
|
153
|
+
**Parameters:**
|
|
154
|
+
- `workspace` (required): Bitbucket workspace name
|
|
155
|
+
- `repo_slug` (required): Repository name/slug
|
|
156
|
+
- `pull_request_id` (required): Pull request ID
|
|
157
|
+
|
|
158
|
+
### list-issues
|
|
159
|
+
Lists issues for a repository.
|
|
160
|
+
|
|
161
|
+
**Parameters:**
|
|
162
|
+
- `workspace` (required): Bitbucket workspace name
|
|
163
|
+
- `repo_slug` (required): Repository name/slug
|
|
164
|
+
- `state` (optional): Filter by state (new, open, resolved, on hold, invalid, duplicate, wontfix, closed)
|
|
165
|
+
- `kind` (optional): Filter by kind (bug, enhancement, proposal, task)
|
|
166
|
+
|
|
167
|
+
### list-branches
|
|
168
|
+
Lists branches for a repository.
|
|
169
|
+
|
|
170
|
+
**Parameters:**
|
|
171
|
+
- `workspace` (required): Bitbucket workspace name
|
|
172
|
+
- `repo_slug` (required): Repository name/slug
|
|
173
|
+
|
|
174
|
+
### get-commits
|
|
175
|
+
Gets recent commits for a repository.
|
|
176
|
+
|
|
177
|
+
**Parameters:**
|
|
178
|
+
- `workspace` (required): Bitbucket workspace name
|
|
179
|
+
- `repo_slug` (required): Repository name/slug
|
|
180
|
+
- `branch` (optional): Specific branch name
|
|
181
|
+
- `limit` (optional): Number of commits (1-50, default: 10)
|
|
182
|
+
|
|
183
|
+
## Development
|
|
184
|
+
|
|
185
|
+
### Building
|
|
186
|
+
```bash
|
|
187
|
+
npm run build
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Development Mode
|
|
191
|
+
```bash
|
|
192
|
+
npm run dev
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Running
|
|
196
|
+
```bash
|
|
197
|
+
npm start
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Authentication
|
|
201
|
+
|
|
202
|
+
This server supports both authenticated and unauthenticated requests:
|
|
203
|
+
|
|
204
|
+
- **Unauthenticated**: Can access public repositories with some limitations
|
|
205
|
+
- **Authenticated**: Full access to private repositories and enhanced rate limits
|
|
206
|
+
|
|
207
|
+
For authentication, use Bitbucket App Passwords (not your account password) for security.
|
|
208
|
+
|
|
209
|
+
## Troubleshooting
|
|
210
|
+
|
|
211
|
+
### Common Issues
|
|
212
|
+
|
|
213
|
+
1. **"Failed to retrieve repositories"**: Check workspace name and authentication
|
|
214
|
+
2. **Rate limiting**: Bitbucket has API rate limits; authenticated requests have higher limits
|
|
215
|
+
3. **Private repositories not accessible**: Ensure app password has correct permissions
|
|
216
|
+
|
|
217
|
+
### Debugging
|
|
218
|
+
|
|
219
|
+
The server logs debug information to stderr. Check your MCP client logs for error messages.
|
|
220
|
+
|
|
221
|
+
### Testing the Server
|
|
222
|
+
|
|
223
|
+
You can test the server directly:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
npm run build
|
|
227
|
+
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | node build/index.js
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## License
|
|
231
|
+
|
|
232
|
+
ISC
|
|
233
|
+
|
|
234
|
+
## Contributing
|
|
235
|
+
|
|
236
|
+
Contributions are welcome! Please feel free to submit issues and pull requests.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
export interface Repository {
|
|
2
|
+
uuid: string;
|
|
3
|
+
name: string;
|
|
4
|
+
full_name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
is_private: boolean;
|
|
7
|
+
created_on: string;
|
|
8
|
+
updated_on: string;
|
|
9
|
+
language?: string;
|
|
10
|
+
size: number;
|
|
11
|
+
owner: {
|
|
12
|
+
display_name: string;
|
|
13
|
+
username: string;
|
|
14
|
+
};
|
|
15
|
+
links: {
|
|
16
|
+
html: {
|
|
17
|
+
href: string;
|
|
18
|
+
};
|
|
19
|
+
clone: Array<{
|
|
20
|
+
name: string;
|
|
21
|
+
href: string;
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface PullRequest {
|
|
26
|
+
id: number;
|
|
27
|
+
title: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
state: string;
|
|
30
|
+
created_on: string;
|
|
31
|
+
updated_on: string;
|
|
32
|
+
author: {
|
|
33
|
+
display_name: string;
|
|
34
|
+
username: string;
|
|
35
|
+
};
|
|
36
|
+
source: {
|
|
37
|
+
branch: {
|
|
38
|
+
name: string;
|
|
39
|
+
};
|
|
40
|
+
repository: {
|
|
41
|
+
full_name: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
destination: {
|
|
45
|
+
branch: {
|
|
46
|
+
name: string;
|
|
47
|
+
};
|
|
48
|
+
repository: {
|
|
49
|
+
full_name: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
links: {
|
|
53
|
+
html: {
|
|
54
|
+
href: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export interface Issue {
|
|
59
|
+
id: number;
|
|
60
|
+
title: string;
|
|
61
|
+
content?: {
|
|
62
|
+
raw: string;
|
|
63
|
+
};
|
|
64
|
+
state: string;
|
|
65
|
+
priority: string;
|
|
66
|
+
kind: string;
|
|
67
|
+
created_on: string;
|
|
68
|
+
updated_on: string;
|
|
69
|
+
reporter: {
|
|
70
|
+
display_name: string;
|
|
71
|
+
username: string;
|
|
72
|
+
};
|
|
73
|
+
assignee?: {
|
|
74
|
+
display_name: string;
|
|
75
|
+
username: string;
|
|
76
|
+
};
|
|
77
|
+
links: {
|
|
78
|
+
html: {
|
|
79
|
+
href: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export interface Branch {
|
|
84
|
+
name: string;
|
|
85
|
+
target: {
|
|
86
|
+
hash: string;
|
|
87
|
+
author: {
|
|
88
|
+
raw: string;
|
|
89
|
+
};
|
|
90
|
+
message: string;
|
|
91
|
+
date: string;
|
|
92
|
+
};
|
|
93
|
+
links: {
|
|
94
|
+
html: {
|
|
95
|
+
href: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export interface Commit {
|
|
100
|
+
hash: string;
|
|
101
|
+
message: string;
|
|
102
|
+
author: {
|
|
103
|
+
raw: string;
|
|
104
|
+
user?: {
|
|
105
|
+
display_name: string;
|
|
106
|
+
username: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
date: string;
|
|
110
|
+
parents: Array<{
|
|
111
|
+
hash: string;
|
|
112
|
+
}>;
|
|
113
|
+
links: {
|
|
114
|
+
html: {
|
|
115
|
+
href: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export interface PaginatedResponse<T> {
|
|
120
|
+
values: T[];
|
|
121
|
+
next?: string;
|
|
122
|
+
size?: number;
|
|
123
|
+
}
|
|
124
|
+
export interface RequestOptions {
|
|
125
|
+
retries?: number;
|
|
126
|
+
retryDelay?: number;
|
|
127
|
+
timeout?: number;
|
|
128
|
+
}
|
|
129
|
+
export interface ApiError extends Error {
|
|
130
|
+
status?: number;
|
|
131
|
+
statusText?: string;
|
|
132
|
+
url?: string;
|
|
133
|
+
}
|
|
134
|
+
export declare class BitbucketAPI {
|
|
135
|
+
private username?;
|
|
136
|
+
private appPassword?;
|
|
137
|
+
constructor(username?: string, appPassword?: string);
|
|
138
|
+
private makeRequest;
|
|
139
|
+
private makeTextRequest;
|
|
140
|
+
listRepositories(workspace: string, page?: string): Promise<{
|
|
141
|
+
repositories: Repository[];
|
|
142
|
+
hasMore: boolean;
|
|
143
|
+
}>;
|
|
144
|
+
getRepository(workspace: string, repoSlug: string): Promise<Repository>;
|
|
145
|
+
getPullRequests(workspace: string, repoSlug: string, state?: string, page?: string): Promise<{
|
|
146
|
+
pullRequests: PullRequest[];
|
|
147
|
+
hasMore: boolean;
|
|
148
|
+
}>;
|
|
149
|
+
getPullRequest(workspace: string, repoSlug: string, pullRequestId: number): Promise<PullRequest>;
|
|
150
|
+
getIssues(workspace: string, repoSlug: string, state?: string, page?: string): Promise<{
|
|
151
|
+
issues: Issue[];
|
|
152
|
+
hasMore: boolean;
|
|
153
|
+
}>;
|
|
154
|
+
getBranches(workspace: string, repoSlug: string, page?: string): Promise<{
|
|
155
|
+
branches: Branch[];
|
|
156
|
+
hasMore: boolean;
|
|
157
|
+
}>;
|
|
158
|
+
getCommits(workspace: string, repoSlug: string, branch?: string, page?: string): Promise<{
|
|
159
|
+
commits: Commit[];
|
|
160
|
+
hasMore: boolean;
|
|
161
|
+
}>;
|
|
162
|
+
getPullRequestDiff(workspace: string, repoSlug: string, pullRequestId: number): Promise<string>;
|
|
163
|
+
}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import fetch from "node-fetch";
|
|
2
|
+
// Bitbucket API configuration
|
|
3
|
+
const BITBUCKET_API_BASE = "https://api.bitbucket.org/2.0";
|
|
4
|
+
const USER_AGENT = "bitbucket-mcp-server/1.0";
|
|
5
|
+
export class BitbucketAPI {
|
|
6
|
+
username;
|
|
7
|
+
appPassword;
|
|
8
|
+
constructor(username, appPassword) {
|
|
9
|
+
this.username = username || process.env.BITBUCKET_USERNAME;
|
|
10
|
+
this.appPassword = appPassword || process.env.BITBUCKET_APP_PASSWORD;
|
|
11
|
+
// Log authentication status (without exposing credentials)
|
|
12
|
+
if (this.username && this.appPassword) {
|
|
13
|
+
console.error(`BitbucketAPI initialized with credentials for user: ${this.username}`);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
console.error("BitbucketAPI initialized without credentials (public access only)");
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
async makeRequest(url, options = {}, requestOptions = {}) {
|
|
20
|
+
const { retries = 3, retryDelay = 1000, timeout = 30000 } = requestOptions;
|
|
21
|
+
const headers = {
|
|
22
|
+
"User-Agent": USER_AGENT,
|
|
23
|
+
"Accept": "application/json",
|
|
24
|
+
...(options.headers || {}),
|
|
25
|
+
};
|
|
26
|
+
// Add authentication if credentials are available
|
|
27
|
+
if (this.username && this.appPassword) {
|
|
28
|
+
const auth = Buffer.from(`${this.username}:${this.appPassword}`).toString('base64');
|
|
29
|
+
headers['Authorization'] = `Basic ${auth}`;
|
|
30
|
+
}
|
|
31
|
+
console.error(`Making request to: ${url}`);
|
|
32
|
+
let lastError = null;
|
|
33
|
+
for (let attempt = 0; attempt <= retries; attempt++) {
|
|
34
|
+
try {
|
|
35
|
+
// Create AbortController for timeout
|
|
36
|
+
const controller = new AbortController();
|
|
37
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
38
|
+
const response = await fetch(url, {
|
|
39
|
+
...options,
|
|
40
|
+
headers,
|
|
41
|
+
signal: controller.signal,
|
|
42
|
+
});
|
|
43
|
+
clearTimeout(timeoutId);
|
|
44
|
+
if (!response.ok) {
|
|
45
|
+
const error = new Error(`Failed to fetch data: ${response.status} ${response.statusText}`);
|
|
46
|
+
error.status = response.status;
|
|
47
|
+
error.statusText = response.statusText;
|
|
48
|
+
error.url = url;
|
|
49
|
+
// Don't retry on client errors (4xx), only on server errors (5xx) or network issues
|
|
50
|
+
if (response.status >= 400 && response.status < 500) {
|
|
51
|
+
console.error(`Client error (${response.status}): ${response.statusText}`);
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
lastError = error;
|
|
55
|
+
console.error(`Server error (attempt ${attempt + 1}/${retries + 1}): ${response.status} ${response.statusText}`);
|
|
56
|
+
if (attempt < retries) {
|
|
57
|
+
console.error(`Retrying in ${retryDelay}ms...`);
|
|
58
|
+
await new Promise(resolve => setTimeout(resolve, retryDelay));
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
console.error(`Request successful: ${response.status}`);
|
|
64
|
+
return (await response.json());
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
if (error instanceof Error && error.name === 'AbortError') {
|
|
68
|
+
const timeoutError = new Error(`Request timeout after ${timeout}ms`);
|
|
69
|
+
timeoutError.url = url;
|
|
70
|
+
lastError = timeoutError;
|
|
71
|
+
}
|
|
72
|
+
else if (error instanceof Error) {
|
|
73
|
+
lastError = error;
|
|
74
|
+
}
|
|
75
|
+
console.error(`Request failed (attempt ${attempt + 1}/${retries + 1}):`, error);
|
|
76
|
+
if (attempt < retries) {
|
|
77
|
+
console.error(`Retrying in ${retryDelay}ms...`);
|
|
78
|
+
await new Promise(resolve => setTimeout(resolve, retryDelay));
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
throw lastError || error;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
throw lastError || new Error('Request failed after all retries');
|
|
85
|
+
}
|
|
86
|
+
async makeTextRequest(url, options = {}, requestOptions = {}) {
|
|
87
|
+
const { retries = 3, retryDelay = 1000, timeout = 30000 } = requestOptions;
|
|
88
|
+
const headers = {
|
|
89
|
+
"User-Agent": USER_AGENT,
|
|
90
|
+
"Accept": "text/plain",
|
|
91
|
+
...(options.headers || {}),
|
|
92
|
+
};
|
|
93
|
+
// Add authentication if credentials are available
|
|
94
|
+
if (this.username && this.appPassword) {
|
|
95
|
+
const auth = Buffer.from(`${this.username}:${this.appPassword}`).toString('base64');
|
|
96
|
+
headers['Authorization'] = `Basic ${auth}`;
|
|
97
|
+
}
|
|
98
|
+
console.error(`Making text request to: ${url}`);
|
|
99
|
+
let lastError = null;
|
|
100
|
+
for (let attempt = 0; attempt <= retries; attempt++) {
|
|
101
|
+
try {
|
|
102
|
+
// Create AbortController for timeout
|
|
103
|
+
const controller = new AbortController();
|
|
104
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
105
|
+
const response = await fetch(url, {
|
|
106
|
+
...options,
|
|
107
|
+
headers,
|
|
108
|
+
signal: controller.signal,
|
|
109
|
+
});
|
|
110
|
+
clearTimeout(timeoutId);
|
|
111
|
+
if (!response.ok) {
|
|
112
|
+
const error = new Error(`Failed to fetch data: ${response.status} ${response.statusText}`);
|
|
113
|
+
error.status = response.status;
|
|
114
|
+
error.statusText = response.statusText;
|
|
115
|
+
error.url = url;
|
|
116
|
+
// Don't retry on client errors (4xx), only on server errors (5xx) or network issues
|
|
117
|
+
if (response.status >= 400 && response.status < 500) {
|
|
118
|
+
console.error(`Client error (${response.status}): ${response.statusText}`);
|
|
119
|
+
throw error;
|
|
120
|
+
}
|
|
121
|
+
lastError = error;
|
|
122
|
+
console.error(`Server error (attempt ${attempt + 1}/${retries + 1}): ${response.status} ${response.statusText}`);
|
|
123
|
+
if (attempt < retries) {
|
|
124
|
+
console.error(`Retrying in ${retryDelay}ms...`);
|
|
125
|
+
await new Promise(resolve => setTimeout(resolve, retryDelay));
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
throw error;
|
|
129
|
+
}
|
|
130
|
+
console.error(`Text request successful: ${response.status}`);
|
|
131
|
+
return await response.text();
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
if (error instanceof Error && error.name === 'AbortError') {
|
|
135
|
+
const timeoutError = new Error(`Request timeout after ${timeout}ms`);
|
|
136
|
+
timeoutError.url = url;
|
|
137
|
+
lastError = timeoutError;
|
|
138
|
+
}
|
|
139
|
+
else if (error instanceof Error) {
|
|
140
|
+
lastError = error;
|
|
141
|
+
}
|
|
142
|
+
console.error(`Text request failed (attempt ${attempt + 1}/${retries + 1}):`, error);
|
|
143
|
+
if (attempt < retries) {
|
|
144
|
+
console.error(`Retrying in ${retryDelay}ms...`);
|
|
145
|
+
await new Promise(resolve => setTimeout(resolve, retryDelay));
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
throw lastError || error;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
throw lastError || new Error('Text request failed after all retries');
|
|
152
|
+
}
|
|
153
|
+
async listRepositories(workspace, page) {
|
|
154
|
+
let url = `${BITBUCKET_API_BASE}/repositories/${workspace}`;
|
|
155
|
+
if (page) {
|
|
156
|
+
url = page;
|
|
157
|
+
}
|
|
158
|
+
const response = await this.makeRequest(url);
|
|
159
|
+
return {
|
|
160
|
+
repositories: response.values,
|
|
161
|
+
hasMore: !!response.next
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
async getRepository(workspace, repoSlug) {
|
|
165
|
+
const url = `${BITBUCKET_API_BASE}/repositories/${workspace}/${repoSlug}`;
|
|
166
|
+
return this.makeRequest(url);
|
|
167
|
+
}
|
|
168
|
+
async getPullRequests(workspace, repoSlug, state, page) {
|
|
169
|
+
let url = `${BITBUCKET_API_BASE}/repositories/${workspace}/${repoSlug}/pullrequests`;
|
|
170
|
+
if (page) {
|
|
171
|
+
url = page;
|
|
172
|
+
}
|
|
173
|
+
else if (state) {
|
|
174
|
+
url += `?state=${state}`;
|
|
175
|
+
}
|
|
176
|
+
const response = await this.makeRequest(url);
|
|
177
|
+
return {
|
|
178
|
+
pullRequests: response.values,
|
|
179
|
+
hasMore: !!response.next
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
async getPullRequest(workspace, repoSlug, pullRequestId) {
|
|
183
|
+
const url = `${BITBUCKET_API_BASE}/repositories/${workspace}/${repoSlug}/pullrequests/${pullRequestId}`;
|
|
184
|
+
return this.makeRequest(url);
|
|
185
|
+
}
|
|
186
|
+
async getIssues(workspace, repoSlug, state, page) {
|
|
187
|
+
let url = `${BITBUCKET_API_BASE}/repositories/${workspace}/${repoSlug}/issues`;
|
|
188
|
+
if (page) {
|
|
189
|
+
url = page;
|
|
190
|
+
}
|
|
191
|
+
else if (state) {
|
|
192
|
+
url += `?state=${state}`;
|
|
193
|
+
}
|
|
194
|
+
const response = await this.makeRequest(url);
|
|
195
|
+
return {
|
|
196
|
+
issues: response.values,
|
|
197
|
+
hasMore: !!response.next
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
async getBranches(workspace, repoSlug, page) {
|
|
201
|
+
let url = `${BITBUCKET_API_BASE}/repositories/${workspace}/${repoSlug}/refs/branches`;
|
|
202
|
+
if (page) {
|
|
203
|
+
url = page;
|
|
204
|
+
}
|
|
205
|
+
const response = await this.makeRequest(url);
|
|
206
|
+
return {
|
|
207
|
+
branches: response.values,
|
|
208
|
+
hasMore: !!response.next
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
async getCommits(workspace, repoSlug, branch, page) {
|
|
212
|
+
let url = `${BITBUCKET_API_BASE}/repositories/${workspace}/${repoSlug}/commits`;
|
|
213
|
+
if (page) {
|
|
214
|
+
url = page;
|
|
215
|
+
}
|
|
216
|
+
else if (branch) {
|
|
217
|
+
url += `/${branch}`;
|
|
218
|
+
}
|
|
219
|
+
const response = await this.makeRequest(url);
|
|
220
|
+
return {
|
|
221
|
+
commits: response.values,
|
|
222
|
+
hasMore: !!response.next
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
async getPullRequestDiff(workspace, repoSlug, pullRequestId) {
|
|
226
|
+
const url = `${BITBUCKET_API_BASE}/repositories/${workspace}/${repoSlug}/pullrequests/${pullRequestId}/diff`;
|
|
227
|
+
return this.makeTextRequest(url);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
//# sourceMappingURL=bitbucket-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bitbucket-api.js","sourceRoot":"","sources":["../src/bitbucket-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,YAAY,CAAC;AAEhD,8BAA8B;AAC9B,MAAM,kBAAkB,GAAG,+BAA+B,CAAC;AAC3D,MAAM,UAAU,GAAG,0BAA0B,CAAC;AAyH9C,MAAM,OAAO,YAAY;IACf,QAAQ,CAAU;IAClB,WAAW,CAAU;IAE7B,YAAY,QAAiB,EAAE,WAAoB;QACjD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