feat(webhook-listener): inject issue context on label bootstrap#147
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the webhook-listener’s issues.labeled bootstrap path so the LangGraph thread starts with an initial human message containing the GitHub issue title/body (fixing empty message history for the po agent when label bootstrapping).
Changes:
- Extended the
issues.labeledwebhook payload Zod schema to includeissue.titleandissue.body(nullable). - Injected an initial
messages: [{ type: 'human', content: ... }]context message intograph.run()for label bootstrap. - Updated labeled-event tests to include
title/bodyand assert the newmessagespayload.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| apps/webhook-listener/src/routes/webhook.ts | Adds issue title/body extraction and injects a human context message into the bootstrap graph.run() call. |
| apps/webhook-listener/src/routes/webhook.spec.ts | Updates labeled webhook payload fixtures and graph.run assertions to include the injected context message. |
…dy bootstrap test - Replace .trim() pattern with conditional expression in graph.run message content; avoids stripping trailing whitespace from non-null issue bodies - Add bootstrap-triggering test for null issue body asserting message content contains only the title with no appended blank line or body
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
Closes #146
Fixed webhook listener's bootstrap label handler to inject issue title and body as initial context. When an issue is labeled with a whitelisted label (e.g.,
type: chore), thepoagent now receives the issue title and body as an initialhumanmessage instead of starting with an empty message history.Changes
apps/webhook-listener/src/routes/webhook.tsLabeledEventPayloadSchemato includetitle: z.string()andbody: z.string().nullable()on theissueobjectissues.labeledhandler to destructureissueTitleandissueBodyfrom the webhook payloadmessagesfield tograph.run()call with initial context injectionapps/webhook-listener/src/routes/webhook.spec.tstitleandbodyfieldsgraph.runassertions to expect the newmessagesfield with injected contextlabeled event with null issue body: omits body from context messageTest Results
Copilot Review Triage
Deferred follow-ups
None.