You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Correct GitHub API instructions for comment responses
Address review feedback: GitHub issue/PR timeline comments don't support
threaded replies. Updated the agent prompt to:
- Remove reference to non-existent /issues/comments/{id}/replies endpoint
- Clarify that issue comments require creating new comments with references
- Keep in_reply_to for PR review comments (which do support threading)
- Update workflow instructions to be consistent with correct API usage
Copy file name to clipboardExpand all lines: src/utils/prompt.ts
+21-11Lines changed: 21 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -6,21 +6,31 @@ Important: How you handle changes depends on the context:
6
6
- If you are working on a Pull Request (PR): You are allowed to commit directly to that PR's branch.
7
7
- If you are working on a GitHub Issue: You must create a new branch and open a Pull Request with your changes.
8
8
9
-
CRITICAL - Replying to Comments:
10
-
When this action is triggered by a user comment, you MUST reply to that specific comment (not create a new standalone comment).
9
+
CRITICAL - Responding to Comments:
10
+
When this action is triggered by a user comment, you should acknowledge the triggering comment in your response.
11
11
- A "Triggering Comment ID" will be provided in the prompt context.
12
-
- Use this comment ID to create a REPLY to that comment using the GitHub API.
13
-
- For issue comments: Use POST /repos/{owner}/{repo}/issues/comments/{comment_id}/replies or reference the comment in your reply.
14
-
- For PR review comments: Use POST /repos/{owner}/{repo}/pulls/{pull_number}/comments with the \`in_reply_to\` parameter set to the triggering comment ID.
15
-
- This ensures your response appears as a threaded reply to the user's original comment, making the conversation easy to follow.
16
-
- If no triggering comment ID is provided, you may create a new comment.
12
+
- Use the github-api tool to interact with GitHub.
13
+
14
+
How to respond depends on the comment type:
15
+
16
+
1. For issue/PR timeline comments (most common):
17
+
- GitHub issue comments do NOT support threaded replies - there is no reply endpoint.
18
+
- Create a new comment using: POST /repos/{owner}/{repo}/issues/{issue_number}/comments
19
+
- In your comment body, reference the triggering comment by quoting it or linking to it.
20
+
- Example: Start your comment with "> Replying to [comment](link):" or quote the relevant text.
21
+
22
+
2. For PR review comments (inline code comments):
23
+
- These DO support threaded replies via the \`in_reply_to\` parameter.
24
+
- Use: POST /repos/{owner}/{repo}/pulls/{pull_number}/comments with \`in_reply_to\` set to the triggering comment ID.
25
+
26
+
If no triggering comment ID is provided, simply create a new comment on the issue/PR.
17
27
18
28
Your workflow:
19
-
1. Reply to the triggering comment to let the user know you're starting to work on it.
20
-
- IMPORTANT: Use the Triggering Comment ID to reply directly to that comment (see above).
29
+
1. Post a comment acknowledging the user's request and let them know you're starting to work on it.
30
+
- Reference the triggering comment (see instructions above for how to respond to comments).
21
31
2. Read the PR context and understand the request.
22
32
3. Create a Todo List:
23
-
- Update your reply comment with a todo list of what you're going to do. (Use the github-api tool to update your reply comment.)
33
+
- Update your comment with a todo list of what you're going to do. (Use the github-api tool with PATCH /repos/{owner}/{repo}/issues/comments/{comment_id} to update your comment.)
24
34
- Use your GitHub comment to maintain a detailed task list based on the request.
25
35
- Format todos as a checklist (- [ ] for incomplete, - [x] for complete).
26
36
- Update the comment with each task completion.
@@ -39,7 +49,7 @@ Your workflow:
39
49
- Files modified
40
50
- Links to PRs/commits
41
51
5. Final Comment Update (IMPORTANT):
42
-
- When you are completely done with all tasks, update your reply comment ONE FINAL TIME.
52
+
- When you are completely done with all tasks, update your comment ONE FINAL TIME.
43
53
- REMOVE the entire task list/checklist from the comment.
44
54
- Replace the comment body with ONLY a concise, minimal final summary.
45
55
- Keep it brief: just state what was attempted and what was done.
0 commit comments