Skip to content

Carry GitHub issue comments into the Slack mirror thread - #330

Open
joei4cm wants to merge 1 commit into
CopilotKit:mainfrom
joei4cm:fix/268-github-comment-slack-mirror
Open

joei4cm wants to merge 1 commit into
CopilotKit:mainfrom
joei4cm:fix/268-github-comment-slack-mirror

Conversation

@joei4cm

@joei4cm joei4cm commented Dec 3, 2026

Copy link
Copy Markdown

What changed

A GitHub issue comment reached the ticket but never the Slack mirror. handleIssueComment appended its Message row directly and enqueued no mirror job, and nothing logged the omission — so an engineer reading the mirror thread saw a ticket with one AI answer and read it as the reporter having gone quiet.

  • apps/github-app/src/webhooks/issue-comment.ts now enqueues the same reply mirror job the shared InboundHandler enqueues for a Discord follow-up, behind the gate every other mirror producer uses (isSlackMirrorEnabled + isMirrorableSource). Team-member comments mirror too — the thread is meant to be the whole life of the ticket.
  • toPlatformTarget is exported from @copilotkit/outpost/shared/platforms so the webhook resolves the same platform target the handler does instead of repeating the mapping. It takes the source as a string, because Prisma's generated TicketSource is a union of string literals rather than the shared enum, and the two carry the same values.
  • New tests: a comment reaches the mirror as a threaded reply (not a new root), a team-member comment mirrors too, and the mirror stays silent when it is off, when no channel is configured, or when the ticket's source is not mirrorable.
  • The scope wording in .env.example and docs/deployment.md moves with the code.

What this does not do

GitHub Discussion comments still do not reach the mirror: discussion_comment is a separate GitHub event, and the app has no handler for it. The docs now say exactly that — follow-ups arrive from Discord and from GitHub issue comments, and a discussion comment is still dropped without a log — so the stated limit keeps describing what actually happens. Wiring the discussion webhook is the other half of #268 and is left for a separate change.

issue-comment.ts was reformatted by Prettier in the process: the file was not format-clean on main, and CI checks formatting on every changed file.

Validation

  • pnpm --filter @copilotkit/outpost-github-app test — 7 files, 65 tests passed.
  • pnpm turbo run typecheck --filter=@copilotkit/outpost-github-app — passed.
  • pnpm --filter @copilotkit/outpost-github-app lint and pnpm --filter @copilotkit/outpost lint — no errors.
  • npx prettier --check on the changed files — passed.
  • git diff --check — passed.

Refs #268

🤖 Generated with Claude Code

A GitHub issue comment reached the ticket but never the Slack mirror:
the webhook appended its Message row directly and enqueued no mirror
job, and nothing logged the omission. An engineer reading the mirror
thread saw a ticket with one AI answer and read it as the reporter
having gone quiet.

The webhook now enqueues the same reply job the shared InboundHandler
enqueues for a Discord follow-up, behind the gate every other mirror
producer uses (isSlackMirrorEnabled + isMirrorableSource), and mirrors
team-member comments too — the thread is meant to be the whole life of
the ticket.

GitHub Discussions still do not reach the mirror: discussion_comment is a
separate GitHub event and there is no handler for it. The scope wording
in .env.example and docs/deployment.md moves with the code, so it keeps
describing what actually happens.

Refs CopilotKit#268

Co-Authored-By: Claude Code <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant