Skip to content

feat(github): add support for issue comment threads#342

Merged
bensabic merged 2 commits intomainfrom
feat/github-issue-comments
Apr 8, 2026
Merged

feat(github): add support for issue comment threads#342
bensabic merged 2 commits intomainfrom
feat/github-issue-comments

Conversation

@bensabic
Copy link
Copy Markdown
Contributor

@bensabic bensabic commented Apr 7, 2026

  • Remove the pull_request guard in handleWebhook so issue_comment events on plain issues are processed
  • Add type discriminator ("pr" | "issue") to GitHubThreadId
  • New thread ID format for issues: github:owner/repo:issue:42 (existing PR formats unchanged)
  • fetchThread branches on type to call issues.get() vs pulls.get()
  • encodeThreadId/decodeThreadId handle the new issue format
  • Validate that reviewCommentId cannot be set on issue threads
  • All other methods (postMessage, editMessage, deleteMessage, reactions, fetchMessages) already use issues.* APIs and work for both PRs and issues with no changes
  • listThreads remains PR-only for now (issue threads are created reactively via webhooks)
  • Updated tests, README thread model table, package.json description/keywords
  • Minor changeset for @chat-adapter/github

Handle issue_comment webhooks on plain issues, not just PRs.
Issue threads use the format github:owner/repo:issue:42.
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 7, 2026

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

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 Apr 7, 2026 10:01am
chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 Apr 7, 2026 10:01am

Copy link
Copy Markdown
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

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

Additional Suggestion:

parseMessage always produces PR-format thread IDs for issue_comment raw messages, even when they originated from a plain GitHub issue thread, because the raw message type lacks a discriminator for PR vs issue.

Fix on Vercel

parseMessage and other methods now correctly produce issue-format thread
IDs when the raw message originated from a plain issue, not a PR.
@bensabic bensabic merged commit 21498a4 into main Apr 8, 2026
12 checks passed
@bensabic bensabic deleted the feat/github-issue-comments branch April 8, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants