Help Center/ CodeArts Pipeline/ API Reference/ API/ Change Management/ Modifying the Code Repository of a Change
Updated on 2025-03-25 GMT+08:00

Modifying the Code Repository of a Change

Function

This API is used to modify the code repository of a change.

Calling Method

For details, see Calling APIs.

URI

PUT /v2/{cloudProjectId}/change-request/{changeRequestId}/repos/update

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

cloudProjectId

Yes

String

Project ID.

changeRequestId

Yes

String

Change ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

repos

Yes

Array of repos objects

Repo information.

Table 3 repos

Parameter

Mandatory

Type

Description

repo_id

Yes

String

Repo code repository ID.

http_url

Yes

String

HTTP address of the code repository.

git_url

Yes

String

Git address of the code repository.

feature_branch

Yes

String

Feature branch.

main_branch

Yes

String

Default branch.

delete_branch_after_released

Yes

Boolean

Whether to delete the feature branch after release.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

-

String

Whether the request is successful.

Example Requests

PUT https://{endpoint}/v2/2d09f712e9504b61b034cc8f40e475a8/change-request/095ff1ca27f743a493349103a6070414/repos/update

[ {
  "http_url" : "https://example.com/test00001/maven.git",
  "git_url" : "git@example.com:test00001/maven.git",
  "feature_branch" : "aa",
  "main_branch" : "master",
  "delete_branch_after_released" : false,
  "repo_id" : "804934"
} ]

Example Responses

Status code: 200

ok

true

Status Codes

Status Code

Description

200

ok

Error Codes

See Error Codes.