feat(webhooks): parse out commenter relevant fields when receiving a github webhook#931
Open
knechtionscoding wants to merge 1 commit intokelos-dev:mainfrom
Open
Conversation
Contributor
Author
|
@gjkim42 I think this is ready for review |
Contributor
Author
|
bump @gjkim42 |
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.
…webhook
What type of PR is this?
/kind feature
What this PR does / why we need it:
Extracts comment-specific fields (CommentAuthor, CommentBody, CommentURL) from GitHub webhook payloads for issue_comment, pull_request_review, and pull_request_review_comment events and exposes them as template variables for TaskSpawner prompt templates.
Previously, these fields were never parsed or included in the template variables map, causing prompt template execution to fail with map has no entry for key "CommentAuthor" when a spawner referenced {{.CommentAuthor}}.
Which issue(s) this PR is related to:
N/A
Special notes for your reviewer:
The Sender field (which was already populated) represents the user who triggered the webhook event, which is typically the same as the comment author. However, CommentAuthor is explicitly extracted from the comment/review object for clarity, and CommentBody/CommentURL provide access to the comment content rather than the parent issue/PR body.
Does this PR introduce a user-facing change?
Summary by cubic
Expose comment-specific template variables from GitHub webhooks so TaskSpawner prompts can use CommentAuthor, CommentBody, and CommentURL without missing-key errors. Supports
issue_comment,pull_request_review, andpull_request_review_commentevents.CommentAuthor,CommentBody,CommentURLto event data and export via ExtractGitHubWorkItem.Written for commit 8d2c292. Summary will update on new commits.