@stubbedev/atlassian-mcp 0.1.14 → 0.1.16
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/README.md +2 -1
- package/dist/bitbucket.js +15 -4
- package/dist/index.js +4 -2
- package/dist/jira.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server for **s
|
|
|
53
53
|
| `bitbucket_merge_pr` | Merge a pull request |
|
|
54
54
|
| `bitbucket_decline_pr` | Decline a pull request |
|
|
55
55
|
| `bitbucket_get_pr_comments` | Get PR comment threads in bulk, including task-style BLOCKER comments and blocker counts |
|
|
56
|
-
| `bitbucket_add_pr_comment` | Add a
|
|
56
|
+
| `bitbucket_add_pr_comment` | Add a PR comment; when remarking on an existing comment, pass `commentId` so it is posted as a thread reply |
|
|
57
57
|
| `bitbucket_update_pr_comment` | Update comment text/severity, resolve or reopen normal threads via `threadResolved`, and resolve/reopen BLOCKER tasks via `state` (strictly enforced) |
|
|
58
58
|
| `bitbucket_delete_pr_comment` | Delete a PR comment by comment ID |
|
|
59
59
|
| `bitbucket_get_pr_commits` | List commits included in a pull request |
|
|
@@ -78,6 +78,7 @@ All list tools support `limit` and `start`/`startAt` for pagination.
|
|
|
78
78
|
- "update PR 42 title and reviewers" → `bitbucket_update_pull_request`
|
|
79
79
|
- "create or update PR from this branch in one call" → `bitbucket_mutate_pull_request`
|
|
80
80
|
- "show review comments on PR 42" → `bitbucket_get_pr_comments`
|
|
81
|
+
- "reply to comment 123 on PR 42" → `bitbucket_add_pr_comment` with `commentId=123`
|
|
81
82
|
- "give me one full overview of PR 42" → `bitbucket_get_pr_overview`
|
|
82
83
|
- "how many open blockers are on PR 42" → `bitbucket_get_pr_comments` with `severity=BLOCKER` and `countOnly=true`
|
|
83
84
|
- "resolve this review thread on PR 42" → `bitbucket_update_pr_comment` with `threadResolved=true`
|
package/dist/bitbucket.js
CHANGED
|
@@ -682,14 +682,25 @@ export class BitbucketClient {
|
|
|
682
682
|
}
|
|
683
683
|
async addPrComment(args) {
|
|
684
684
|
const { projectKey, repoSlug } = this.resolveProjectAndRepo(args.projectKey, args.repoSlug);
|
|
685
|
+
const replyToCommentId = args.commentId;
|
|
686
|
+
if (replyToCommentId !== undefined
|
|
687
|
+
&& (args.filePath !== undefined
|
|
688
|
+
|| args.srcPath !== undefined
|
|
689
|
+
|| args.line !== undefined
|
|
690
|
+
|| args.lineType !== undefined
|
|
691
|
+
|| args.fileType !== undefined
|
|
692
|
+
|| args.multilineStartLine !== undefined
|
|
693
|
+
|| args.multilineStartLineType !== undefined)) {
|
|
694
|
+
throw new Error('Replies must target an existing comment thread only. Omit filePath/line and other anchor fields when replying.');
|
|
695
|
+
}
|
|
685
696
|
let commentText = args.text;
|
|
686
697
|
if (args.suggestion !== undefined) {
|
|
687
698
|
const suggestionBlock = `\`\`\`suggestion\n${args.suggestion}\n\`\`\``;
|
|
688
699
|
commentText = args.text ? `${args.text}\n\n${suggestionBlock}` : suggestionBlock;
|
|
689
700
|
}
|
|
690
701
|
const body = { text: validateCommentText(commentText) };
|
|
691
|
-
if (
|
|
692
|
-
body.parent = { id:
|
|
702
|
+
if (replyToCommentId !== undefined)
|
|
703
|
+
body.parent = { id: replyToCommentId };
|
|
693
704
|
let inlineAnchor;
|
|
694
705
|
if (args.filePath !== undefined || args.line !== undefined) {
|
|
695
706
|
if (args.filePath === undefined || args.line === undefined) {
|
|
@@ -733,8 +744,8 @@ export class BitbucketClient {
|
|
|
733
744
|
}
|
|
734
745
|
if (!created)
|
|
735
746
|
return text(`Comment added to PR #${args.prId}.`);
|
|
736
|
-
if (
|
|
737
|
-
return text(`Reply #${created.id} added to comment #${
|
|
747
|
+
if (replyToCommentId !== undefined) {
|
|
748
|
+
return text(`Reply #${created.id} added to comment #${replyToCommentId} on PR #${args.prId}.`);
|
|
738
749
|
}
|
|
739
750
|
const location = args.filePath && args.line ? ` on ${args.filePath}:${args.line}` : '';
|
|
740
751
|
return text(`Comment #${created.id} added to PR #${args.prId}${location}.`);
|
package/dist/index.js
CHANGED
|
@@ -548,7 +548,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
548
548
|
},
|
|
549
549
|
{
|
|
550
550
|
name: 'bitbucket_get_pr_comments',
|
|
551
|
-
description: 'Use when you want PR review discussion in bulk: comment threads, task-style BLOCKER comments, and blocker counts with pagination. For review tasks, locate PR by branch first instead of assuming it is in your inbox. You can pass projectKey/repoSlug or project/repo.',
|
|
551
|
+
description: 'Use when you want PR review discussion in bulk: comment threads, task-style BLOCKER comments, and blocker counts with pagination. The returned comment IDs are used as commentId in bitbucket_add_pr_comment (reply mode), bitbucket_update_pr_comment, and bitbucket_delete_pr_comment. For review tasks, locate PR by branch first instead of assuming it is in your inbox. You can pass projectKey/repoSlug or project/repo.',
|
|
552
552
|
inputSchema: {
|
|
553
553
|
type: 'object',
|
|
554
554
|
properties: {
|
|
@@ -571,6 +571,8 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
571
571
|
name: 'bitbucket_add_pr_comment',
|
|
572
572
|
description: `Add a PR review comment or reply to an existing thread.
|
|
573
573
|
|
|
574
|
+
REPLIES TO SPECIFIC COMMENTS ARE MANDATORY: If your remark is about an existing comment/thread, you MUST reply in that thread by setting commentId. Do not post a new top-level PR comment or a new inline thread for follow-up remarks on an existing comment.
|
|
575
|
+
|
|
574
576
|
FOR REVIEW FEEDBACK, DEFAULT TO INLINE + EXAMPLE: Prefer anchored inline comments with a concrete code change example (suggestion) over top-level prose. Use top-level comments only for overall PR-wide feedback.
|
|
575
577
|
|
|
576
578
|
INLINE COMMENTS ARE STRONGLY PREFERRED: Whenever your comment refers to a specific line or block of code, you MUST provide filePath and line to anchor it as an inline comment on the diff. General top-level comments (no filePath/line) should only be used for overall PR feedback that does not relate to any particular line.
|
|
@@ -586,7 +588,7 @@ Keep comments concise, plain text, and free of filler. Never include emojis. You
|
|
|
586
588
|
repoSlug: { type: 'string', description: 'Repository slug, e.g. "payments-service" (usually auto-detected)' },
|
|
587
589
|
repo: { type: 'string', description: 'Alias for repoSlug' },
|
|
588
590
|
prId: { type: 'number', description: 'Pull request number (PR ID)' },
|
|
589
|
-
|
|
591
|
+
commentId: { type: 'number', description: 'Comment ID to reply to. Same identifier style as update/delete tools (optional).' },
|
|
590
592
|
text: { type: 'string', description: 'Concise comment text. No filler. Do not include emojis. If suggestion is also provided, this text appears above the suggestion block.' },
|
|
591
593
|
filePath: { type: 'string', description: 'Destination file path for inline comment, e.g. "src/index.ts". Must be provided together with line.' },
|
|
592
594
|
srcPath: { type: 'string', description: 'Source file path. Only needed when the file was renamed; otherwise omit (defaults to filePath).' },
|
package/dist/jira.js
CHANGED
|
@@ -292,6 +292,7 @@ export class JiraClient {
|
|
|
292
292
|
const f = data.fields;
|
|
293
293
|
const lines = [
|
|
294
294
|
`Issue: ${data.key} — ${f.summary}`,
|
|
295
|
+
`URL: ${this.issueUrl(data.key)}`,
|
|
295
296
|
`Status: ${f.status.name}`,
|
|
296
297
|
`Type: ${f.issuetype.name}`,
|
|
297
298
|
`Priority: ${f.priority?.name ?? 'None'}`,
|