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 說明文件。