获取仓库上一次的提交统计信息-九游平台
功能介绍
获取仓库上一次的提交统计信息
调试
您可以在中调试该接口,支持自动认证鉴权。api explorer可以自动生成sdk代码示例,并提供sdk代码示例调试功能。
uri
get /v1/repositories/{repository_id}/statistics
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
repository_id |
是 |
string |
仓库的主键id |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
branch_name |
是 |
string |
分支名 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
x-auth-token |
是 |
string |
用户token。 通过调用iam服务获取用户token接口获取(响应消息头中x-subject-token的值)。 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
error |
error object |
响应错误 |
result |
repocommitstatistics object |
响应结果 |
status |
string |
响应状态 |
参数 |
参数类型 |
描述 |
---|---|---|
code |
string |
错误码 |
message |
string |
错误信息 |
参数 |
参数类型 |
描述 |
---|---|---|
all_branch_commits_count |
integer |
仓库总提交次数 |
codelines |
array of repodailycodeline objects |
近15日每日代码提交行数 |
count |
integer |
对应分支仓库总提交次数 |
event |
repostatisticsevent object |
仓库统计状态 |
statistics |
array of repostatistics objects |
仓库统计列表 |
total |
integer |
仓库统计次数 |
参数 |
参数类型 |
描述 |
---|---|---|
additions |
integer |
每日增加代码行 |
date |
string |
日期 |
deletions |
integer |
每日删除代码行 |
参数 |
参数类型 |
描述 |
---|---|---|
branch |
string |
分支名 最小长度:1 最大长度:260 |
created_at |
string |
仓库统计创建的时间 |
date |
string |
仓库统计的日期 |
id |
integer |
仓库统计事件的id |
project_id |
integer |
仓库id |
status |
string |
仓库统计的状态: 等待统计waiting 正在统计active 完成统计finish |
updated_at |
string |
仓库统计更新的时间 |
user_id |
integer |
用户id |
参数 |
参数类型 |
描述 |
---|---|---|
add_lines |
integer |
添加代码行 |
branch |
string |
分支名 最小长度:1 最大长度:260 |
commit_count |
integer |
提交次数 |
created_at |
string |
仓库统计创建的时间 |
delete_lines |
integer |
删除代码行 |
id |
integer |
仓库统计记录id |
project_id |
integer |
仓库id |
updated_at |
string |
仓库统计更新的时间 |
user_name |
string |
用户名 |
请求示例
无
响应示例
状态码: 200
ok
{ "result" : { "event" : null, "total" : 0, "statistics" : [ ], "all_branch_commits_count" : 1, "count" : 1, "codelines" : { "additions" : 0, "deletions" : 0, "date" : "20191015" } }, "status" : "success" }
状态码
状态码 |
描述 |
---|---|
200 |
ok |
错误码
请参见错误码。
相关文档
意见反馈
文档内容是否对您有帮助?
如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨