tektoncd / tektoncd/pipelines-as-code
feat: Add PR description and file changes to LLM context
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 214
- Forks
- 144
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 27
Description
Description
Add PR description (body) and list of files changed to the LLM context to provide richer information for AI-powered analysis.
Context
This was suggested in PR #2292 review comment: https://github.com/openshift-pipelines/pipelines-as-code/pull/2292#discussion_r2468174103
Currently, the LLM context includes basic PR information (number, title, labels) but not:
- PR description/body
- List of files changed in the PR
Proposed Changes
-
Extend Event struct (
pkg/params/info/events.go):- Add
PullRequestBody stringfield - Add
PullRequestFiles []stringfield (or more detailed file change info)
- Add
-
Update provider implementations to fetch this data:
- GitHub provider
- GitLab provider
- Gitea provider
- Bitbucket providers
-
Update context assembler (
pkg/llm/context/assembler.go):- Include PR body in
buildPRContent()method - Include file changes list in the context
- Include PR body in
Benefits
- Better context for LLM to understand what the PR is trying to accomplish
- File changes can help identify which areas of code might be related to failures
- More comprehensive analysis of test failures in relation to code changes
Priority
This is a future enhancement and not blocking for the initial LLM analysis feature.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading pkg/params/info/events.go and pkg/llm/context/assembler.go, especially buildPRContent(), then inspect the GitHub, GitLab, Gitea, and Bitbucket provider implementations. Done means the event carries the PR body and changed-file list, each provider supplies them, and the assembler includes both in the LLM context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, gitlab, go
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100