@stubbedev/atlassian-mcp 0.3.8 → 0.3.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 +7 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/bitbucket.js
CHANGED
|
@@ -1047,6 +1047,13 @@ export class BitbucketClient {
|
|
|
1047
1047
|
else {
|
|
1048
1048
|
validateSuggestionPlacement(commentText);
|
|
1049
1049
|
}
|
|
1050
|
+
// Adding a comment must never create a task. In Bitbucket Server a comment with
|
|
1051
|
+
// severity=BLOCKER renders as a PR task; tasks are created only via
|
|
1052
|
+
// bitbucket_pr_tasks, and only when explicitly requested. Reject the BLOCKER
|
|
1053
|
+
// severity here so an inline review comment can never silently become a task.
|
|
1054
|
+
if (args.severity === 'BLOCKER') {
|
|
1055
|
+
throw new Error('Adding a comment never creates a task. Omit severity (comments post as NORMAL). To create a task, use bitbucket_pr_tasks (action=create) — only when the user explicitly asks for one.');
|
|
1056
|
+
}
|
|
1050
1057
|
const body = { text: validateCommentText(commentText) };
|
|
1051
1058
|
if (args.severity)
|
|
1052
1059
|
body.severity = args.severity;
|
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. 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.`,
|
|
446
|
+
description: `Add, update, or delete a PR comment. action defaults to "add". This tool posts COMMENTS, never tasks — never set severity=BLOCKER to create a task. severity=BLOCKER is rejected on add and only ever valid on update to escalate an already-blocking comment. To create a task, use bitbucket_pr_tasks (action=create), and only when the user explicitly asks for a task. 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: {
|
|
@@ -467,7 +467,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
467
467
|
suggestion: { type: 'string', description: 'Replacement code to suggest. Use whenever proposing a concrete code change. Posted as the final ```suggestion``` block so Apply suggestion appears. Requires filePath + line.' },
|
|
468
468
|
state: { type: 'string', enum: ['OPEN', 'RESOLVED'], description: 'Task state for BLOCKER comments (update only)' },
|
|
469
469
|
threadResolved: { type: 'boolean', description: 'Resolve/reopen normal comment thread (update only)' },
|
|
470
|
-
severity: { type: 'string', enum: ['NORMAL', 'BLOCKER'], description: 'Comment severity. BLOCKER
|
|
470
|
+
severity: { type: 'string', enum: ['NORMAL', 'BLOCKER'], description: 'Comment severity. Leave unset — comments default to NORMAL. BLOCKER turns the comment into a task and is REJECTED on add; only pass BLOCKER on update to escalate an existing comment when the user explicitly asks. To create a task, use bitbucket_pr_tasks instead.' },
|
|
471
471
|
},
|
|
472
472
|
required: ['prId'],
|
|
473
473
|
},
|