Git

查询提交列表。List commits.

分页查询指定仓库中的提交记录。支持按分支或提交哈希指定起始点,按作者、提交者筛选,按时间范围过滤。返回每条提交的哈希值、消息、作者、时间等信息。 Paginate commits of the specified repository. Supports specifying a starting point by branch or commit hash, filtering by author/committer, and filtering by time range. Returns hash, message, author, and time for each commit. 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r

get/{repo}/-/git/commits

Request

  • Base URL: https://api.cnb.cool (the document declares no server; this is the origin it was published from)
  • URL: https://api.cnb.cool/{repo}/-/git/commits
  • Auth: API key in header Authorization

Path parameters

repostring required

不带.git后缀的仓库名称。格式:组织名称/仓库名称。Repository name without .git suffix. Format: org/repo.

Query parameters

shastring

提交标识符。格式:分支名称,提交哈希值. Commit identifier. Format: branch_name,commit_hash

authorstring

作者匹配模式,支持Git原生正则表达式匹配作者信息。

committerstring

提交者匹配模式,支持Git原生正则表达式匹配提交者信息。

sincestring

提交时间起始范围。示例:2025-01-01T00:00:00Z. Commit time range start. Example: 2025-01-01T00:00:00Z

untilstring

提交时间结束范围。示例:2025-12-31T23:59:59Z. Commit time range end. Example: 2025-12-31T23:59:59Z

pageinteger

分页页码。Page number.

page_sizeinteger

分页页大小。Page size.

Response

OK

Changes

No recorded changes to this operation across all 1 revision of this API.