api to override uuid - #46
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new REST API endpoint to programmatically update build UUIDs, expanding beyond the existing GitHub comment-based approach. It introduces a dedicated service for managing override operations with the plan to extend it for environment variables and service overrides.
- Creates a new OverrideService with UUID validation and update functionality
- Adds PATCH
/api/v1/builds/{uuid}/overrides/uuidendpoint for UUID updates - Refactors existing UUID update logic to use the new service
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/server/services/override.ts |
New service handling UUID validation and build updates with transaction management |
src/server/services/activityStream.ts |
Refactored to use OverrideService instead of inline UUID update logic |
src/pages/api/v1/builds/[uuid]/overrides/uuid.ts |
New API endpoint with comprehensive OpenAPI documentation |
Comments suppressed due to low confidence (1)
src/server/services/override.ts:1
- The error message should match the comparison being made. Since the code checks
newUuid === build.uuid, the error should be "UUID must be different from current UUID" to be more specific.
/**
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
0ccf7a2 to
1034d91
Compare
What
Adds a new API endpoint
/api/v1/builds/{uuid}/overrides/uuidto programmatically update build UUIDs, which waspreviously only available through GitHub comment commands.
Usage
PS: created a new override service to extend it with functions to update env vars and service overrides