Method: projects.locations.connections.gitRepositoryLinks.diffCommit

GitRepositoryLink 的差异提交。

HTTP 请求

GET https://developerconnect.googleapis.com/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:diffCommit

网址采用 gRPC 转码语法。

路径参数

参数
name

string

必需。GitRepositoryLink 的资源名称。

查询参数

参数
baseSha

string

必需。基础提交 SHA 或引用。

headSha

string

必需。头提交 SHA 或引用。

pathFilters[]

string

可选。用于过滤返回文件的路径模式或确切路径。指定 pathFilters 后,系统会为所有匹配的文件填充 FileDiff.patch(使用 ["**"] 可包含所有已更改文件的补丁)。如果省略 pathFilters 或其为空,则系统会返回 FileDiff 的完整列表,而不包含补丁差异(FileDiff.patch 为空)。

请求正文

请求正文必须为空。

响应正文

gitRepositoryLinks.diffCommit 的响应消息。

如果成功,响应正文将包含结构如下的数据:

JSON 表示法
{
  "files": [
    {
      object (FileDiff)
    }
  ]
}
字段
files[]

object (FileDiff)

从统一差异中提取的文件差异。

授权范围

需要以下 OAuth 范围:

  • https://www.googleapis.com/auth/cloud-platform

如需了解详情,请参阅 Authentication Overview。

IAM 权限

需要拥有 name 资源的以下 IAM 权限:

  • developerconnect.gitRepositoryLinks.diffCommit

如需了解详情,请参阅 IAM 文档。