chore(purl): implement method to check PURL#5
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR introduces PURL (Package URL) validation functionality by adding CheckPurlByNameType method in ProjectModel to query the projects table, and CheckPurl method in ComponentService to parse PURL strings and delegate validation. Additionally, the GetComponent method now prevents simultaneous version and requirement specification. Configuration files are updated with renamed module reference and adjusted IDE ignore rules. Changes
Sequence DiagramsequenceDiagram
participant Client
participant CS as ComponentService
participant PM as ProjectModel
participant DB as Database
Client->>CS: CheckPurl(ctx, purlString)
CS->>CS: Parse & validate PURL
CS->>PM: CheckPurlByNameType(ctx, name, type)
PM->>PM: Validate inputs
PM->>DB: Query projects/mines join
DB-->>PM: Count result
PM-->>CS: Count, error
CS-->>Client: Count, error
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
e127877 to
85d6c92
Compare
Summary by CodeRabbit
New Features
Chores