@stubbedev/atlassian-mcp 0.3.6 → 0.3.8

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
@@ -1021,6 +1021,16 @@ export class BitbucketClient {
1021
1021
  || args.toHash !== undefined)) {
1022
1022
  throw new Error('Replies must target an existing comment thread only. Omit filePath/line and other anchor fields when replying.');
1023
1023
  }
1024
+ if (replyToCommentId !== undefined) {
1025
+ const parent = await this.request('GET', `${this.rp(projectKey, repoSlug)}/pull-requests/${args.prId}/comments/${replyToCommentId}`).catch(() => null);
1026
+ if (parent) {
1027
+ const me = await this.getCurrentUsername();
1028
+ const existingReply = (parent.comments ?? []).find((r) => !r.deleted && r.author?.name === me);
1029
+ if (existingReply) {
1030
+ throw new Error(`You already replied to comment #${replyToCommentId} (your reply is #${existingReply.id}). Never post a second reply on the same thread — update your existing reply instead: action=update commentId=${existingReply.id}.`);
1031
+ }
1032
+ }
1033
+ }
1024
1034
  if (args.text === undefined && args.suggestion === undefined) {
1025
1035
  throw new Error('Either text or suggestion is required when adding a comment.');
1026
1036
  }
package/dist/index.js CHANGED
@@ -443,7 +443,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
443
443
  },
444
444
  {
445
445
  name: 'bitbucket_comment',
446
- description: `Add, update, or delete a PR comment. action defaults to "add". For code changes, ALWAYS use inline comments with suggestion when exact replacement code is available. Keep any explanatory text before the suggestion block only (never after), or Bitbucket may hide Apply suggestion. Replies MUST use commentId. Keep comments concise, no emojis. Only call proactively (without being asked) when you are a reviewer on the PR (i.e. "Viewing as" says "you are a reviewer") — never post unsolicited comments on PRs you authored. For inline comments: ALWAYS pass fromHash + toHash matching the commit you actually reviewed (read from bitbucket_pr_diff or bitbucket_get_pr output). Without them the anchor falls back to current PR head, and if the branch advanced between review and post the line number will point at unrelated code.`,
446
+ description: `Add, update, or delete a PR comment. action defaults to "add". For code changes, ALWAYS use inline comments with suggestion when exact replacement code is available. Keep any explanatory text before the suggestion block only (never after), or Bitbucket may hide Apply suggestion. Replies MUST use commentId. Only one reply per thread per author: if you already replied to a comment, update your existing reply (action=update commentId=<your-reply-id>) instead of posting a second one. The server enforces this and will reject the second add. Keep comments concise, no emojis. Only call proactively (without being asked) when you are a reviewer on the PR (i.e. "Viewing as" says "you are a reviewer") — never post unsolicited comments on PRs you authored. For inline comments: ALWAYS pass fromHash + toHash matching the commit you actually reviewed (read from bitbucket_pr_diff or bitbucket_get_pr output). Without them the anchor falls back to current PR head, and if the branch advanced between review and post the line number will point at unrelated code. When the comment body references another comment by id, render it as a markdown hyperlink \`[#<id>](<baseUrl>/projects/<PROJECT>/repos/<REPO>/pull-requests/<prId>/overview?commentId=<id>)\` — never a bare \`#<id>\`, which is unclickable in Bitbucket's renderer.`,
447
447
  inputSchema: {
448
448
  type: 'object',
449
449
  properties: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stubbedev/atlassian-mcp",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "MCP server for self-hosted Jira and Bitbucket",
5
5
  "license": "MIT",
6
6
  "type": "module",