Skip to content

api to override uuid - #46

Merged
vigneshrajsb merged 3 commits into
mainfrom
override-uuid-api
Sep 29, 2025
Merged

api to override uuid#46
vigneshrajsb merged 3 commits into
mainfrom
override-uuid-api

Conversation

@vigneshrajsb

Copy link
Copy Markdown
Contributor

What

Adds a new API endpoint /api/v1/builds/{uuid}/overrides/uuid to programmatically update build UUIDs, which was
previously only available through GitHub comment commands.

Usage

 PATCH /api/v1/builds/{current-uuid}/overrides/uuid
Content-Type: application/json

{
  "uuid": "my-custom-id"
}

PS: created a new override service to extend it with functions to update env vars and service overrides

@vigneshrajsb
vigneshrajsb requested a review from a team as a code owner September 9, 2025 22:39
@vigneshrajsb
vigneshrajsb requested a review from Copilot September 9, 2025 22:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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/uuid endpoint 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.

Comment thread src/server/services/override.ts
Comment thread src/pages/api/v1/builds/[uuid]/overrides/uuid.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread src/server/services/override.ts
Comment thread src/pages/api/v1/builds/[uuid]/index.ts
@vigneshrajsb
vigneshrajsb merged commit b013703 into main Sep 29, 2025
1 check 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.

3 participants