Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 029ae0d280 | |||
| 92b435eb80 | |||
| cacf9674c4 | |||
| f73260e3e6 | |||
| 3ddd6db7ca | |||
| 68499340e4 |
+1
-2
@@ -21,12 +21,11 @@ runs:
|
|||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: "*"
|
||||||
- name: Setup Node.js 24
|
- name: Setup Node.js 24
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "24"
|
node-version: "24"
|
||||||
cache: "pnpm"
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -30,6 +30,29 @@ export const instructions = `- use the ${ghPullfrogMcpName} MCP server to intera
|
|||||||
- do not under any circumstances use the gh cli
|
- do not under any circumstances use the gh cli
|
||||||
- if prompted by a comment to respond to create a new issue, pr or anything else, after succeeding,
|
- if prompted by a comment to respond to create a new issue, pr or anything else, after succeeding,
|
||||||
also respond to the original comment with a very brief message containing a link to it
|
also respond to the original comment with a very brief message containing a link to it
|
||||||
|
- mode selection: choose the appropriate mode based on the prompt payload:
|
||||||
|
- choose "plan mode" if the prompt asks to:
|
||||||
|
- create a plan, break down tasks, outline steps, or analyze requirements
|
||||||
|
- understand the scope of work before implementation
|
||||||
|
- provide a todo list or task breakdown
|
||||||
|
- choose "implement" if the prompt asks to:
|
||||||
|
- implement, build, create, or develop code changes
|
||||||
|
- make specific changes to files or features
|
||||||
|
- execute a plan that was previously created
|
||||||
|
- the prompt includes specific implementation details or requirements
|
||||||
|
- choose "review" if the prompt asks to:
|
||||||
|
- review code, PR, or implementation
|
||||||
|
- provide feedback, suggestions, or identify issues
|
||||||
|
- check code quality, style, or correctness
|
||||||
|
- once you've chosen a mode, follow its associated prompts carefully
|
||||||
|
- when prompted directly (e.g., via issue comment or PR comment):
|
||||||
|
(1) start by creating a single response comment using mcp__${ghPullfrogMcpName}__create_issue_comment
|
||||||
|
- the initial comment should say something like "I'll do {summary of request}" where you summarize what was requested
|
||||||
|
- save the commentId returned from this initial comment creation
|
||||||
|
(2) use mcp__${ghPullfrogMcpName}__edit_issue_comment to progressively update that same comment as you make progress
|
||||||
|
- update the comment with current status, completed tasks, and any relevant information
|
||||||
|
- continue updating the same comment throughout the planning/implementation process
|
||||||
|
(3) create_issue_comment should only be used once initially - all subsequent updates must use edit_issue_comment with the saved commentId
|
||||||
- if prompted to review a PR:
|
- if prompted to review a PR:
|
||||||
(1) get PR info with mcp__${ghPullfrogMcpName}__get_pull_request (this automatically prepares the repository by fetching and checking out the PR branch)
|
(1) get PR info with mcp__${ghPullfrogMcpName}__get_pull_request (this automatically prepares the repository by fetching and checking out the PR branch)
|
||||||
(2) view diff: git diff origin/<base>...origin/<head> (use line numbers from this for inline comments)
|
(2) view diff: git diff origin/<base>...origin/<head> (use line numbers from this for inline comments)
|
||||||
|
|||||||
+28
-1
@@ -6,7 +6,7 @@ export const Comment = type({
|
|||||||
body: type.string.describe("the comment body content"),
|
body: type.string.describe("the comment body content"),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const CommentTool = tool({
|
export const CreateCommentTool = tool({
|
||||||
name: "create_issue_comment",
|
name: "create_issue_comment",
|
||||||
description: "Create a comment on a GitHub issue",
|
description: "Create a comment on a GitHub issue",
|
||||||
parameters: Comment,
|
parameters: Comment,
|
||||||
@@ -26,3 +26,30 @@ export const CommentTool = tool({
|
|||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const EditComment = type({
|
||||||
|
commentId: type.number.describe("the ID of the comment to edit"),
|
||||||
|
body: type.string.describe("the new comment body content"),
|
||||||
|
});
|
||||||
|
|
||||||
|
export const EditCommentTool = tool({
|
||||||
|
name: "edit_issue_comment",
|
||||||
|
description: "Edit a GitHub issue comment by its ID",
|
||||||
|
parameters: EditComment,
|
||||||
|
execute: contextualize(async ({ commentId, body }, ctx) => {
|
||||||
|
const result = await ctx.octokit.rest.issues.updateComment({
|
||||||
|
owner: ctx.owner,
|
||||||
|
repo: ctx.name,
|
||||||
|
comment_id: commentId,
|
||||||
|
body: body,
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
success: true,
|
||||||
|
commentId: result.data.id,
|
||||||
|
url: result.data.html_url,
|
||||||
|
body: result.data.body,
|
||||||
|
updatedAt: result.data.updated_at,
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|||||||
+9
-2
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
// Minimal GitHub Issue Comment MCP Server
|
// Minimal GitHub Issue Comment MCP Server
|
||||||
import { FastMCP } from "fastmcp";
|
import { FastMCP } from "fastmcp";
|
||||||
import { CommentTool } from "./comment.ts";
|
import { CreateCommentTool, EditCommentTool } from "./comment.ts";
|
||||||
import { IssueTool } from "./issue.ts";
|
import { IssueTool } from "./issue.ts";
|
||||||
import { PullRequestTool } from "./pr.ts";
|
import { PullRequestTool } from "./pr.ts";
|
||||||
import { PullRequestInfoTool } from "./prInfo.ts";
|
import { PullRequestInfoTool } from "./prInfo.ts";
|
||||||
@@ -13,6 +13,13 @@ const server = new FastMCP({
|
|||||||
version: "0.0.1",
|
version: "0.0.1",
|
||||||
});
|
});
|
||||||
|
|
||||||
addTools(server, [CommentTool, IssueTool, PullRequestTool, ReviewTool, PullRequestInfoTool]);
|
addTools(server, [
|
||||||
|
CreateCommentTool,
|
||||||
|
EditCommentTool,
|
||||||
|
IssueTool,
|
||||||
|
PullRequestTool,
|
||||||
|
ReviewTool,
|
||||||
|
PullRequestInfoTool,
|
||||||
|
]);
|
||||||
|
|
||||||
server.start();
|
server.start();
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pullfrog/action",
|
"name": "@pullfrog/action",
|
||||||
"version": "0.0.68",
|
"version": "0.0.71",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user