Skip to content

Conversation

shimondeitch
Copy link
Member

@shimondeitch shimondeitch commented Oct 8, 2025

Summary by CodeRabbit

  • New Features
    • Policy compliance status responses now include project-level event details (scan ID, event ID, project ID, project name), enabling more granular tracking across projects.
    • Enhanced visibility into which projects are associated with each compliance check, improving troubleshooting and reporting for multi-project scans.
  • Documentation
    • Updated API response description to reflect inclusion of project event details.

Copy link

coderabbitai bot commented Oct 8, 2025

📝 Walkthrough

Walkthrough

  • Added a new public model class org.whitesource.agent.api.model.ProjectEvents implementing Serializable, with fields: scanUuid, eventUuid, projectUuid, projectName; includes default and all-args constructors, getters, and setters.
  • Updated org.whitesource.agent.api.dispatch.AsyncCheckPolicyComplianceStatusResult to include a new field projectEvents of type Collection, with corresponding getter and setter.
  • Introduced necessary imports for Collection and ProjectEvents.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “SCA-3061-support-CLI” references an issue ID and CLI support but does not describe the actual changes, which add a new ProjectEvents model and integrate a projectEvents field into AsyncCheckPolicyComplianceStatusResult; thus it fails to summarize the main changes. Please update the pull request title to clearly summarize the primary change, for example “Add ProjectEvents model and include projectEvents in AsyncCheckPolicyComplianceStatusResult,” so it accurately reflects the modifications introduced.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch SCA-3061-support-CLI

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
wss-agent-api/src/main/java/org/whitesource/agent/api/model/ProjectEvents.java (2)

5-5: Consider renaming to ProjectEvent (singular).

The class name ProjectEvents suggests a collection, but it represents a single project event. Since AsyncCheckPolicyComplianceStatusResult uses Collection<ProjectEvents>, renaming to ProjectEvent would make the relationship clearer: Collection<ProjectEvent>.


5-54: Consider adding equals(), hashCode(), and toString() methods.

Since instances of this class are used in a Collection, overriding these methods would be beneficial for debugging and proper collection behavior, especially if you need to compare or search for specific ProjectEvents instances.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c86f687 and 72642b2.

📒 Files selected for processing (2)
  • wss-agent-api/src/main/java/org/whitesource/agent/api/dispatch/AsyncCheckPolicyComplianceStatusResult.java (3 hunks)
  • wss-agent-api/src/main/java/org/whitesource/agent/api/model/ProjectEvents.java (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*

⚙️ CodeRabbit configuration file

**/*: - Feedback will only be given on issues that could cause bugs or involve very bad practices.

  • Comments will be kept concise and focused on critical areas.

Files:

  • wss-agent-api/src/main/java/org/whitesource/agent/api/dispatch/AsyncCheckPolicyComplianceStatusResult.java
  • wss-agent-api/src/main/java/org/whitesource/agent/api/model/ProjectEvents.java
🧬 Code graph analysis (1)
wss-agent-api/src/main/java/org/whitesource/agent/api/dispatch/AsyncCheckPolicyComplianceStatusResult.java (1)
wss-agent-api/src/main/java/org/whitesource/agent/api/model/ProjectEvents.java (1)
  • ProjectEvents (5-55)
🔇 Additional comments (6)
wss-agent-api/src/main/java/org/whitesource/agent/api/dispatch/AsyncCheckPolicyComplianceStatusResult.java (3)

3-6: LGTM!

The imports are correctly added for the new field type.


18-18: LGTM!

The new field follows the existing pattern in this class where fields are nullable by default.


38-44: LGTM!

The getter and setter methods are correctly implemented.

wss-agent-api/src/main/java/org/whitesource/agent/api/model/ProjectEvents.java (3)

1-7: LGTM!

The class structure and serialization setup are correct.


9-22: LGTM!

The fields and constructors are correctly implemented.


24-54: LGTM!

The getters and setters are correctly implemented.

@ChenLuigi ChenLuigi merged commit 040a933 into master Oct 8, 2025
2 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