@stubbedev/atlassian-mcp 0.3.4 → 0.3.5
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/dist/bitbucket.js +9 -0
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/bitbucket.js
CHANGED
|
@@ -810,6 +810,15 @@ export class BitbucketClient {
|
|
|
810
810
|
await this.request('DELETE', `${this.rp(projectKey, repoSlug)}/pull-requests/${args.prId}/approve`);
|
|
811
811
|
return text(`Approval removed from PR #${args.prId}.\n${this.pullRequestUrl(projectKey, repoSlug, args.prId)}`);
|
|
812
812
|
}
|
|
813
|
+
async needsWorkPr(args) {
|
|
814
|
+
const { projectKey, repoSlug } = this.resolveProjectAndRepo(args.projectKey, args.repoSlug);
|
|
815
|
+
const userSlug = await this.getCurrentUsername();
|
|
816
|
+
const data = await this.request('PUT', `${this.rp(projectKey, repoSlug)}/pull-requests/${args.prId}/participants/${encodeURIComponent(userSlug)}`, { user: { name: userSlug }, approved: false, status: 'NEEDS_WORK' });
|
|
817
|
+
const url = this.pullRequestUrl(projectKey, repoSlug, args.prId);
|
|
818
|
+
if (!data)
|
|
819
|
+
return text(`Marked PR #${args.prId} as Needs work.\n${url}`);
|
|
820
|
+
return text(`Marked PR #${args.prId} as Needs work as ${data.user.displayName}.\n${url}`);
|
|
821
|
+
}
|
|
813
822
|
async declinePr(args) {
|
|
814
823
|
const { projectKey, repoSlug } = this.resolveProjectAndRepo(args.projectKey, args.repoSlug);
|
|
815
824
|
const pr = await this.request('GET', `${this.rp(projectKey, repoSlug)}/pull-requests/${args.prId}`);
|
package/dist/index.js
CHANGED
|
@@ -402,7 +402,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
402
402
|
},
|
|
403
403
|
{
|
|
404
404
|
name: 'bitbucket_mutate',
|
|
405
|
-
description: 'Use when asked to "open a PR for this branch", "create a pull request", "approve this PR", "merge it", "ship it", or "decline this PR". Auto-targets the open PR for the current branch when prId is omitted. Handles create, update, approve/unapprove, decline, and merge in one call.',
|
|
405
|
+
description: 'Use when asked to "open a PR for this branch", "create a pull request", "approve this PR", "request changes / mark needs work", "merge it", "ship it", or "decline this PR". Auto-targets the open PR for the current branch when prId is omitted. Handles create, update, approve/unapprove, needs_work, decline, and merge in one call. needs_work sets your reviewer status to "Needs work" (Bitbucket Server\'s changes-requested signal); revert with action=unapprove.',
|
|
406
406
|
inputSchema: {
|
|
407
407
|
type: 'object',
|
|
408
408
|
properties: {
|
|
@@ -411,7 +411,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
411
411
|
repoSlug: { type: 'string', description: 'Repository slug (usually auto-detected)' },
|
|
412
412
|
repo: { type: 'string', description: 'Alias for repoSlug' },
|
|
413
413
|
prId: { type: 'number', description: 'Target PR number (optional, auto-resolved from branch)' },
|
|
414
|
-
action: { type: 'string', enum: ['approve', 'unapprove', 'decline', 'merge'], description: 'Lifecycle action to perform (optional)' },
|
|
414
|
+
action: { type: 'string', enum: ['approve', 'unapprove', 'needs_work', 'decline', 'merge'], description: 'Lifecycle action to perform (optional). needs_work = mark your reviewer status as "Needs work" (changes requested).' },
|
|
415
415
|
mergeStrategy: { type: 'string', enum: ['MERGE_COMMIT', 'SQUASH', 'FAST_FORWARD'], description: 'Merge strategy (action=merge only)' },
|
|
416
416
|
mergeMessage: { type: 'string', description: 'Custom merge commit message (action=merge only)' },
|
|
417
417
|
declineMessage: { type: 'string', description: 'Decline message (action=decline only)' },
|
|
@@ -847,6 +847,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
847
847
|
return await bitbucket.approvePr(a);
|
|
848
848
|
if (action === 'unapprove')
|
|
849
849
|
return await bitbucket.unapprovePr(a);
|
|
850
|
+
if (action === 'needs_work')
|
|
851
|
+
return await bitbucket.needsWorkPr(a);
|
|
850
852
|
if (action === 'decline')
|
|
851
853
|
return await bitbucket.declinePr({ ...a, message: a.declineMessage });
|
|
852
854
|
if (action === 'merge')
|