feat(github): deliver webhook events to Mesh via trigger callbacks#332
Open
viktormarinho wants to merge 1 commit intomainfrom
Open
feat(github): deliver webhook events to Mesh via trigger callbacks#332viktormarinho wants to merge 1 commit intomainfrom
viktormarinho wants to merge 1 commit intomainfrom
Conversation
Store callback URL and token from TRIGGER_CONFIGURE, then POST event payloads to Mesh's trigger-callback endpoint on webhook match. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
1 issue found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="github/server/webhook.ts">
<violation number="1" location="github/server/webhook.ts:66">
P1: Non-2xx callback responses are treated as success because only rejected fetches are caught; failed deliveries (e.g., 401/500) will not be logged.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| const credentials = getCallbackCredentials(connectionId); | ||
| if (credentials) { | ||
| // Fire-and-forget callback to Mesh | ||
| fetch(credentials.callbackUrl, { |
Contributor
There was a problem hiding this comment.
P1: Non-2xx callback responses are treated as success because only rejected fetches are caught; failed deliveries (e.g., 401/500) will not be logged.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At github/server/webhook.ts, line 66:
<comment>Non-2xx callback responses are treated as success because only rejected fetches are caught; failed deliveries (e.g., 401/500) will not be logged.</comment>
<file context>
@@ -59,6 +59,38 @@ export async function handleGitHubWebhook(req: Request): Promise<Response> {
+ const credentials = getCallbackCredentials(connectionId);
+ if (credentials) {
+ // Fire-and-forget callback to Mesh
+ fetch(credentials.callbackUrl, {
+ method: "POST",
+ headers: {
</file context>
Open
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TRIGGER_CONFIGUREin a per-connection credentials mapTest plan
callbackUrlandcallbackTokenviaTRIGGER_CONFIGURE🤖 Generated with Claude Code
Summary by cubic
Delivers GitHub webhook events to Mesh via per-connection trigger callbacks. Stores callback URL and token from
TRIGGER_CONFIGURE, posts matched events to the Mesh callback endpoint, and cleans up credentials when no triggers remain.callbackUrlandcallbackTokenper connection duringTRIGGER_CONFIGURE.Written for commit 1bb576b. Summary will update on new commits.