Queries the submission of a branch of a repository based on the group name and repository name.
Function
This API is used to obtain the submission list based on the repository group name, repository name, and branch.
URI
GET /v1/repositories/{group_name}/{repository_name}/commits
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
group_name |
Yes |
String |
Repository group name (Example: git@repo.alpha.devcloud.inhuawei.com:Demo00228/testword.git Group name: Demo00228) |
repository_name |
Yes |
String |
Repository name |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
page_index |
No |
Integer |
Pagination Index |
page_size |
No |
Integer |
Pagination Index |
ref_name |
Yes |
String |
Branch or label name. The SHA format is supported. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Response error. |
result |
CommitList object |
Result |
status |
String |
Status code in a response |
Parameter |
Type |
Description |
---|---|---|
commits |
Array of Commit objects |
Submission List |
total |
Integer |
Total Submitted |
Parameter |
Type |
Description |
---|---|---|
author_email |
String |
Author Email |
author_name |
String |
Author |
authored_date |
String |
Author Submission Time |
committed_date |
String |
Submitted |
committer_email |
String |
Submit Author Email |
committer_name |
String |
Requester |
format |
Object |
Details about the file change. The format is determined by the stat_format parameter. |
id |
String |
Submit the corresponding SHA ID. |
message |
String |
Submitted Information |
parent_ids |
Array of strings |
Parent Submission ID |
Example Requests
GET https://{endpoint}/v1/repositories/{group_name}/{repository_name}/commits
Example Responses
Status code: 200
OK
{ "result" : { "total" : 1, "commits" : [ { "id" : "a27fafa7d8da2dd55f691bef989226d22f50d8ce", "message" : "Initial commit", "parent_ids" : [ ], "authored_date" : null, "author_name" : "repo", "author_email" : "repo@huawei.com", "committed_date" : "2019-10-15 09:40:29", "committer_name" : "repo", "committer_email" : "a618e34bd5704be3ae3395dfede06041@huawei.com" } ] }, "status" : "success" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot