dev-preprod-prod logic
This commit is contained in:
@@ -203,4 +203,31 @@ class RemoteRepoCreateRequest(BaseModel):
|
||||
default_branch: Optional[str] = "main"
|
||||
# [/DEF:RemoteRepoCreateRequest:Class]
|
||||
|
||||
|
||||
# [DEF:PromoteRequest:Class]
|
||||
# @PURPOSE: Request schema for branch promotion workflow.
|
||||
class PromoteRequest(BaseModel):
|
||||
from_branch: str = Field(..., min_length=1, max_length=255)
|
||||
to_branch: str = Field(..., min_length=1, max_length=255)
|
||||
mode: str = Field(default="mr", pattern="^(mr|direct)$")
|
||||
title: Optional[str] = None
|
||||
description: Optional[str] = None
|
||||
reason: Optional[str] = None
|
||||
draft: bool = False
|
||||
remove_source_branch: bool = False
|
||||
# [/DEF:PromoteRequest:Class]
|
||||
|
||||
|
||||
# [DEF:PromoteResponse:Class]
|
||||
# @PURPOSE: Response schema for promotion operation result.
|
||||
class PromoteResponse(BaseModel):
|
||||
mode: str
|
||||
from_branch: str
|
||||
to_branch: str
|
||||
status: str
|
||||
url: Optional[str] = None
|
||||
reference_id: Optional[str] = None
|
||||
policy_violation: bool = False
|
||||
# [/DEF:PromoteResponse:Class]
|
||||
|
||||
# [/DEF:backend.src.api.routes.git_schemas:Module]
|
||||
|
||||
Reference in New Issue
Block a user