文档

查询分支列表

该接口用于查询代码库分支列表

请求方式GET/api/v3/projects/[ProjectId]/repository/branches

请求Action:ListRepositoryBranches

请求参数:

参数名

类型

说明

是否必须

默认值

ProjectId

long

代码库id

Page

long

页数,默认1

1

PageSize

long

每页条数,默认20

20

Search

string

搜索字段

返回 body :

{
    "ErrorCode": "",
    "ErrorMessage": "",
    "RequestId": "",
    "Success":true,
    "Result": [
  {
   "BranchName": "",
   "ProtectedBranch": false,
   "CommitInfo": {
    "Id": "b022b4518194d8078c825990fd878838dafdaab2",
    "ShortId": "b022b451",
    "Title": "Delete file kq4wg8f1_new",
    "AuthorName": "xxxxxx",
    "AuthorEmail": "xxxxxxx@xxx.com",
    "CreatedAt": "2020-09-04T11:44:42+08:00",
    "Message": "Delete file kq4wg8f1_new",
    "AuthorDate": "2020-09-04T11:44:42+08:00",
    "CommittedDate": "2020-09-04T11:44:42+08:00",
    "CommitterEmail": "xxxxxxx@xxx.com",
    "CommitterName": "xxxxxxx",
    "ParentIds": [
     "36f089ea679a45adaac5c882e2c19d2b2f96308e"
    ]
   }
     }
 ],
 "Total": 1
}

返回结果说明:

参数名

类型

说明

BranchName

string

分支名称

ProtectedBranch

boolean

保护分支

CommitInfo

struct

分支最近一次提交信息

CommitInfo结构:

参数名

类型

说明

Id

string

commit SHA

ShortId

string

短id

Title

string

标题,提交的第一行内容

AuthorName

string

作者姓名

AuthorEmail

string

作者邮箱

CreatedAt

string

创建时间

Message

string

提交内容

AuthorDate

string

作者提交时间

CommittedDate

string

提交者提交时间

CommitterEmail

string

提交者邮箱

CommitterName

string

提交者姓名

ParentIds

list

父提交id

  • 本页导读 (0)
文档反馈