Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions src/actions/messages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,18 @@ describe("formatPRCommentMessage", () => {
expect(instrIdx).toBeLessThan(commentIdx);
});

test("instructs agent to react with 👍 for automated non-actionable comments", () => {
test("delegates handling to the /receiving-feedback skill", () => {
const msg = formatPRCommentMessage({
commentUrl: "https://github.com/org/repo/pull/1#comment-1",
commenter: "bot",
timestamp: "2026-03-17T12:00:00Z",
body: "Approvability check passed",
});
expect(msg).toContain("👍");
expect(msg).toContain("automated");
expect(msg).toContain(
"Use the /receiving-feedback skill to handle the following comment.",
);
expect(msg).not.toContain("👍");
expect(msg).not.toContain("automated");
});

test("includes file path and line number for review comments", () => {
Expand Down Expand Up @@ -114,15 +117,18 @@ describe("formatIssueCommentMessage", () => {
expect(instrIdx).toBeLessThan(commentIdx);
});

test("instructs agent to react with 👍 for automated non-actionable comments", () => {
test("delegates handling to the /receiving-feedback skill", () => {
const msg = formatIssueCommentMessage({
commentUrl: "https://github.com/org/repo/issues/42#comment-1",
commenter: "github-actions",
timestamp: "2026-03-17T12:00:00Z",
body: "Task created: https://coder.example.com/tasks/123",
});
expect(msg).toContain("👍");
expect(msg).toContain("automated");
expect(msg).toContain(
"Use the /receiving-feedback skill to handle the following comment.",
);
expect(msg).not.toContain("👍");
expect(msg).not.toContain("automated");
});
});

Expand Down
18 changes: 2 additions & 16 deletions src/actions/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,7 @@ Commenter: ${params.commenter}
Timestamp: ${params.timestamp}${locationLine}

[INSTRUCTIONS]
First, determine whether this comment requires action.

If the comment is automated and does not require code changes or a reply — for example: bot status updates, approvability checks, CI notifications, merge conflict warnings, or other non-human automated comments — react to the comment with a 👍 emoji and take no further action.

If the comment contains valid suggestions or feedback from a human reviewer, implement them, ensure the branch is still in a healthy state (all lint and tests continue to pass), then commit and push. Reply to the comment with a succinct and clear explanation of the changes you made.

If you have questions or need clarification, ask them directly in the comment thread and wait for further feedback.

If no changes are needed or the comment is invalid feedback, reply to the comment with a succinct and clear explanation why no action was taken.
Use the /receiving-feedback skill to handle the following comment.
[END INSTRUCTIONS]

[COMMENT]
Expand All @@ -51,13 +43,7 @@ Commenter: ${params.commenter}
Timestamp: ${params.timestamp}

[INSTRUCTIONS]
First, determine whether this comment requires action.

If the comment is automated and does not contain actionable information — for example: bot status updates, CI notifications, task tracking comments, or other non-human automated comments — react to the comment with a 👍 emoji and take no further action.

If the comment contains new requirements, clarifications, or feedback that affects your current work, adjust your approach accordingly.

If the comment asks a question, reply directly on the issue.
Use the /receiving-feedback skill to handle the following comment.
[END INSTRUCTIONS]

[COMMENT]
Expand Down
Loading