ListMergeRequestPatchSets
Queries all version information under a merge request, including the versions of the merge source and the merge target.
Operation description
The concept of a version is similar to a push. Each version is associated with a commit SHA. A single push may include multiple commits, in which case the associated commit ID is the latest commit in the push.
Try it now
Test
RAM authorization
Request syntax
GET /api/v4/projects/merge_requests/diffs/list_patchsets HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| organizationId |
string |
Yes |
The enterprise identifier, also known as the enterprise ID. It is a string that can be obtained from the Yunxiao URL, such as https://devops.aliyun.com/organization/[OrganizationId]. |
5ebbc0228123212b59xxxxx |
| accessToken |
string |
No |
The personal access token. This field is not required if you use an Alibaba Cloud AccessKey ID and AccessKey secret or Security Token Service (STS) for temporary authorization. |
f0b1e61db5961df5975a93f9129d2513 |
| repositoryIdentity |
string |
Yes |
The ID or full path of the code repository. |
2835387 or codeup/codeup-demo |
| localId |
integer |
Yes |
The local ID of the merge request, which indicates the sequence number of the merge request in the code repository. |
4 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
The request ID. |
F7B85D1B-D1C2-140F-A039-341859F130B9 |
| success |
boolean |
Indicates whether the call is successful. |
true |
| errorCode |
string |
The error code. |
SYSTEM_UNKNOWN_ERROR |
| errorMessage |
string |
The error message. |
"" |
| result |
array<object> |
The list of returned results. |
|
|
object |
The returned result. |
||
| patchSetNo |
integer |
The version number. |
1 |
| patchSetBizId |
string |
The business ID of the version. It is unique and has business significance. This ID is used in all parameters that involve a version ID. |
513fcfd81a9142d2bb0db4f72c0aa15b |
| patchSetName |
string |
The version name. |
Version 1 |
| commitId |
string |
The commit ID associated with the version. |
1a072f5367c21f9de3464b8c0ee8546e47764d2d |
| shortCommitId |
string |
The short commit ID. |
1a072f53 |
| relatedMergeItemType |
string |
The associated merge type. Valid values:
|
MERGE_SOURCE |
| createdAt |
string |
The creation time. The format is YYYY-MM-DD HH:mm:ss. |
2022-03-18 14:24:54 |
Examples
Success response
JSON format
{
"requestId": "F7B85D1B-D1C2-140F-A039-341859F130B9",
"success": true,
"errorCode": "SYSTEM_UNKNOWN_ERROR",
"errorMessage": "\"\"",
"result": [
{
"patchSetNo": 1,
"patchSetBizId": "513fcfd81a9142d2bb0db4f72c0aa15b",
"patchSetName": "版本1",
"commitId": "1a072f5367c21f9de3464b8c0ee8546e47764d2d",
"shortCommitId": "1a072f53",
"relatedMergeItemType": "MERGE_SOURCE",
"createdAt": "2022-03-18 14:24:54"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.