Skip to content

feat(github): Add a tool to comment on pull requests - #2690

Merged
BYK merged 1 commit into
mainfrom
feat/github-reply-to-pr-comment
Nov 4, 2026
Merged

BYK merged 1 commit into
mainfrom
feat/github-reply-to-pr-comment

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #2689. That PR tells Junior to answer an Event question where it was asked, but no GitHub tool could reply in an inline review thread. Junior's earlier thread replies (for example on #2513 and #2631) went through raw gh api …/replies calls. github_submitPullRequestReview can only post a separate review.

Change:

  • New github_commentOnPullRequest tool: repo, number, body, and optional in_reply_to (an inline review comment id).
    • With in_reply_to: POST /repos/{o}/{r}/pulls/{n}/comments/{id}/replies, so the reply goes in that thread.
    • Without it: POST /repos/{o}/{r}/issues/{n}/comments, a pull request comment.
  • Egress sends raw thread-reply writes (…/comments/{id}/replies and the addPullRequestReviewThreadReply mutation) to the tool, the same way reviews and feedback reactions go to theirs. Raw issues/{n}/comments stays allowed, because github-issues uses it for issues.
  • The github-code skill tables list the tool. The note that was added to github_submitPullRequestReview in fix(task): Answer Event questions where they were asked #2689 is removed, because the new tool is now the answer route.

Posting still goes through action review (default approval mode). The tool does not limit posting to bot-authored pull requests, because Junior also answers in threads on pull requests that it reviewed.

via @BYK.

--

View Session in Sentry

Answers to pull request questions went through raw gh api calls for
inline thread replies, and submitPullRequestReview could not reply in a
thread. Add github_commentOnPullRequest: it posts a pull request comment,
or replies in an inline review thread with in_reply_to. Route raw
thread-reply writes to the tool, as with reviews and feedback reactions.

Co-Authored-By: BYK <[email protected]>
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 4, 2026 9:57pm UTC

Request Review

@BYK
BYK enabled auto-merge (squash) November 4, 2026 21:59
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

3 screenshot changes — 3 changed · 0 added · 0 removed

Review screenshots in Frameshift

Automation Page · Desktop
Automation Page · Desktop
Changed
Conversation Share Details · Desktop
Conversation Share Details · Desktop
Changed
Settings Mcp · Desktop
Settings Mcp · Desktop
Changed

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a0d5174. Configure here.

@BYK
BYK merged commit 84d9b2f into main Nov 4, 2026
46 checks passed
@BYK
BYK deleted the feat/github-reply-to-pr-comment branch November 4, 2026 22:03
BYK pushed a commit that referenced this pull request Nov 5, 2026
…2693)

Follow-up to #2690, from [Bugbot's review
comment](#2690 (comment)).

`POST /pulls/{n}/comments/{id}/replies` accepts only the first comment
of a thread. GitHub's docs say: "Replies to replies are not supported."
Events often name a later reply, so `github_commentOnPullRequest` failed
with 404 or 422 in the usual case.

Now, when `in_reply_to` is set, the tool reads the comment
(`github.pull.comment.get`) and replies to its `in_reply_to_id` when it
has one. A missing comment returns a `PluginToolInputError`.

This PR is stacked on #2692, which changes the same file.

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3A3ee1f99a8027cbdb43eb2584 -->

--

[View Session in
Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A3ee1f99a8027cbdb43eb2584/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>

This branch was successfully deployed

1 active deployment
Preview – junior-docs — a0d51742 Deployed Nov 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant