@stubbedev/atlassian-mcp 0.1.9 → 0.1.10

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 CHANGED
@@ -442,8 +442,8 @@ export class BitbucketClient {
442
442
  const existing = await this.request('GET', `/projects/${projectKey}/repos/${repoSlug}/pull-requests/${args.prId}`);
443
443
  if (!existing)
444
444
  throw new Error(`PR #${args.prId} not found.`);
445
- const buildBody = (version) => {
446
- const body = { version };
445
+ const buildBody = (pr) => {
446
+ const body = { version: pr.version };
447
447
  if (args.title !== undefined)
448
448
  body.title = args.title;
449
449
  if (args.description !== undefined)
@@ -454,14 +454,16 @@ export class BitbucketClient {
454
454
  repository: { slug: repoSlug, project: { key: projectKey } },
455
455
  };
456
456
  }
457
- if (args.reviewers !== undefined) {
458
- body.reviewers = args.reviewers.map((name) => ({ user: { name } }));
459
- }
457
+ // Always include reviewers to avoid Bitbucket clearing them on PUT.
458
+ // Only replace them when explicitly provided by the caller.
459
+ body.reviewers = args.reviewers !== undefined
460
+ ? args.reviewers.map((name) => ({ user: { name } }))
461
+ : pr.reviewers.map((r) => ({ user: { name: r.user.name } }));
460
462
  return body;
461
463
  };
462
464
  let updated;
463
465
  try {
464
- updated = await this.request('PUT', `/projects/${projectKey}/repos/${repoSlug}/pull-requests/${args.prId}`, buildBody(existing.version));
466
+ updated = await this.request('PUT', `/projects/${projectKey}/repos/${repoSlug}/pull-requests/${args.prId}`, buildBody(existing));
465
467
  }
466
468
  catch (error) {
467
469
  const message = error instanceof Error ? error.message : String(error);
@@ -470,7 +472,7 @@ export class BitbucketClient {
470
472
  const latest = await this.request('GET', `/projects/${projectKey}/repos/${repoSlug}/pull-requests/${args.prId}`);
471
473
  if (!latest)
472
474
  throw error;
473
- updated = await this.request('PUT', `/projects/${projectKey}/repos/${repoSlug}/pull-requests/${args.prId}`, buildBody(latest.version));
475
+ updated = await this.request('PUT', `/projects/${projectKey}/repos/${repoSlug}/pull-requests/${args.prId}`, buildBody(latest));
474
476
  }
475
477
  if (!updated)
476
478
  return text(`Updated PR #${args.prId}.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stubbedev/atlassian-mcp",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "MCP server for self-hosted Jira and Bitbucket",
5
5
  "license": "MIT",
6
6
  "type": "module",