获取代码量贡献
GET/api/v5/:owner/:repo/repository/commit_statistics
Request
Path Parameters
owner stringrequired
仓库所属空间地址(组织或个人的地址path)
repo stringrequired
仓库路径(path)
Query Parameters
access_token string
用户授权码
branch_name stringrequired
分支名
author string
作者用户名
only_self boolean
查询个人
since string
仅返回此日期及以后的提交
until string
仅返回此日期及之前的提交
Responses
- 200
成功响应
Response Headers
- application/json
- Schema
- Example (auto)
- Example
Schema
- Array [
- ]
- Array [
- ]
commits object[]
author_namestring
datestring
statistics object[]
project_idinteger
branchstring
user_namestring
nick_namestring
add_linesinteger
delete_linesinteger
commit_countinteger
totalinteger
{
"commits": [
{
"author_name": "string",
"date": "string"
}
],
"statistics": [
{
"project_id": 0,
"branch": "string",
"user_name": "string",
"nick_name": "string",
"add_lines": 0,
"delete_lines": 0,
"commit_count": 0
}
],
"total": 0
}
{
"commits": [
{
"author_name": "tester",
"date": "2024-11-12"
},
{
"author_name": "tester",
"date": "2024-01-15"
}
],
"statistics": [
{
"project_id": 1359,
"branch": "main",
"user_name": "tester",
"nick_name": "测试",
"add_lines": 4370,
"delete_lines": 351,
"commit_count": 123
}
],
"total": 1
}