跳到主要内容

获取仓库贡献者统计信息

GET 

/api/v5/repos/:owner/:repo/contributors/statistic

Request​

Path Parameters

    owner stringrequired

    仓库所属空间地址(企业、组织或个人的地址path)

    repo stringrequired

    仓库路径(path)

Query Parameters

    access_token string

    用户授权码

    author string

    过滤贡献者的用户名。支持指定用户名以获取该用户的贡献数据。默认情况下,返回所有用户的贡献数据。

    current_user boolean

    是否只返回当前用户的数据。true 表示只返回当前用户的贡献数据,false 或者省略则返回所有用户的贡献数据,当为true时,优先级高于author参数。

    since string

    起始日期,格式为 YYYY-MM-DD或者YYYY-MM-DD HH:mm:ss。用来限定返回的贡献数据的起始时间。

    until string

    结束日期,格式为 YYYY-MM-DD或者YYYY-MM-DD HH:mm:ss。用来限定返回的贡献数据的结束时间。

    ref_name string

    指定要获取贡献数据的 ref_name(分支名称、commit id、tag 名称),不传或者为空时使用默认分支。

Responses​

成功响应

Response Headers
    Schema
    • Array [
    • namestring
      emailstring
      overview object
      additionsinteger
      deletionsinteger
      total_changesinteger
      commit_countinteger
      contributions object[]
    • Array [
    • datestring
      additionsinteger
      deletionsinteger
      total_changesinteger
      commit_countinteger
    • ]
    • ]