Repository navigation
Add PR body to GitHub interceptor - #2136
Bryandero98 wants to merge 1 commit into
Conversation
|
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Removed 6 that resolved since the last update (4 merged: aibrix#2729, nanlabs#354, nimblebrain#1206, mrtrix3#3443, hf-to-litertlm#4; 1 closed without merging: gleam#6312) and added 3 new ones opened this session: argo-workflows#16984, tektoncd/pipeline#10781, tektoncd/triggers#2136. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Adds an opt-in addPRBody feature to the GitHub Interceptor, mirroring the existing addChangedFiles feature. When enabled, it fetches the pull request body via the GitHub API and adds it to the pr_body property of the event payload's top-level extensions field. This supports the pull_request event, and issue_comment events raised on a pull request (GitHub fires issue_comment both for comments on plain issues and for comments on pull requests; when the comment is on a plain issue, addPRBody is a no-op since there is no pull request body to add). This lets triggers run CI based on updates to comments on a pull request, where the pull request body itself is otherwise not present in the issue_comment payload. Fixes tektoncd#1339 /kind feature Co-Authored-By: Claude Sonnet 5 <[email protected]>
eab0303 to
35547af
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2136 +/- ##
==========================================
- Coverage 79.96% 79.79% -0.17%
==========================================
Files 94 94
Lines 4576 4657 +81
==========================================
+ Hits 3659 3716 +57
- Misses 662 675 +13
- Partials 255 266 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/assign @savitaashture |
Changes
Adds an opt-in
addPRBodyfeature to the GitHubInterceptor, mirroring the existingaddChangedFilesfeature. When enabled, it fetches the pull request body via the GitHub API and adds it to thepr_bodyproperty of the event payload's top-levelextensionsfield.This supports the
pull_requestevent, andissue_commentevents raised on a pull request (GitHub firesissue_commentboth for comments on plain issues and for comments on pull requests; when the comment is on a plain issue,addPRBodyis a no-op since there is no pull request body to add).This lets triggers run CI based on updates to comments on a pull request, where the pull request body itself is otherwise not present in the
issue_commentpayload - the original use case raised in the issue.Fixes #1339
Docs and a runnable example (
examples/v1beta1/github-add-pr-body) are included, following the same pattern as the existingaddChangedFilesdocs/example.Submitter Checklist
/kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes
🤖 Generated with Claude Code