Skip to content

Refactor build response handling#662

Merged
hanzjk merged 1 commit intowso2:mainfrom
hanzjk:security
Apr 3, 2026
Merged

Refactor build response handling#662
hanzjk merged 1 commit intowso2:mainfrom
hanzjk:security

Conversation

@hanzjk
Copy link
Copy Markdown
Contributor

@hanzjk hanzjk commented Apr 3, 2026

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc.

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter �N/A� plus brief explanation of why there�s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type �Sent� when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type �N/A� and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

Summary by CodeRabbit

Release Notes

  • Refactor
    • Optimized build listing performance by eliminating unnecessary component data fetches.
    • Updated commit ID extraction for builds: commit IDs are now only set when actual commit data exists in workflow parameters, rather than using default values.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 3, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a13b5605-4f9b-4092-bcd7-c4a354e98fbd

📥 Commits

Reviewing files that changed from the base of the PR and between 8d0f492 and e4864f5.

📒 Files selected for processing (1)
  • agent-manager-service/clients/openchoreosvc/client/builds.go

📝 Walkthrough

Walkthrough

A single file is modified to refactor commit and branch information extraction in build listings, moving commit extraction from the build conversion function to the repository detail extraction phase and removing temporary component enrichment.

Changes

Cohort / File(s) Summary
Build Extraction Refactoring
agent-manager-service/clients/openchoreosvc/client/builds.go
Removed temporary component enrichment during ListBuilds and commit defaulting logic in toWorkflowRunBuild. Relocated commit extraction from workflow parameters' repository.revision.commit to repository detail extraction phase, now only setting CommitID when commit data is present.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 From scattered enrichment we've cleared the way,
Commits now flow more direct, hooray!
No "latest" defaults, just truth in the data,
Cleaner extraction—couldn't be greater! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description contains only template placeholders with no actual content filled in. All required sections (Purpose, Goals, Approach, User stories, Release note, etc.) lack implementation details, making it impossible to understand the rationale and impact of the changes. Provide concrete information for all template sections: explain what problems are being solved, what changes are made, testing performed, and document any impacts on security, documentation, or other areas.
Title check ❓ Inconclusive The title 'Refactor build response handling' is generic and lacks specificity about the actual changes made. It does not clearly convey the primary change of refactoring commit extraction logic and removing branch enrichment. Consider a more descriptive title such as 'Extract commit ID from workflow parameters in build response' or 'Refactor commit and branch handling in build listing'
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hanzjk hanzjk merged commit c01186e into wso2:main Apr 3, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants