Skip to content

Add PR body to GitHub interceptor - #2136

Open
Bryandero98 wants to merge 1 commit into
tektoncd:mainfrom
Bryandero98:add-pr-body-interceptor
Open

Bryandero98 wants to merge 1 commit into
tektoncd:mainfrom
Bryandero98:add-pr-body-interceptor

Conversation

@Bryandero98

Copy link
Copy Markdown

Changes

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 - 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 existing addChangedFiles docs/example.

Submitter Checklist

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Add an opt-in `addPRBody` field to the GitHub Interceptor. When enabled, it adds the pull request body to the `pr_body` extension for `pull_request` events and for `issue_comment` events raised on a pull request.

🤖 Generated with Claude Code

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Sep 16, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Bryandero98 / name: Bryandero98 (35547af)

@tekton-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign savitaashture after the PR has been reviewed.
You can assign the PR to them by writing /assign @savitaashture in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 16, 2026
Bryandero98 added a commit to Bryandero98/Bryandero98.github.io that referenced this pull request Sep 16, 2026
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]>
@Bryandero98
Bryandero98 force-pushed the add-pr-body-interceptor branch from eab0303 to 35547af Compare September 17, 2026 03:52
@codecov

codecov Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.79%. Comparing base (cc6014f) to head (35547af).
⚠️ Report is 10 commits behind head on main.

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     
Flag Coverage Δ
unit-tests 79.79% <ø> (-0.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Bryandero98

Copy link
Copy Markdown
Author

/assign @savitaashture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PR body to GitHub interceptor

3 participants