Method: projects.locations.connections.gitRepositoryLinks.fetchFileBlame

ファイルまたはファイル内の行範囲の blame 情報を取得します。

HTTP リクエスト

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

この URL では gRPC Transcoding 構文を使用します。

パスパラメータ

パラメータ
name

string

必須。GitRepositoryLink のリソース名(projects/*/locations/*/connections/*/gitRepositoryLinks/* 形式)。

クエリ パラメータ

パラメータ
ref

string

必須。SCM commit SHA、または blame を取得するシンボリック リビジョン(ブランチ名、タグなど)。

path

string

必須。リポジトリ内のファイルパス。

firstLine

integer

省略可。blame の対象範囲の開始行番号(1 から始まるインデックス、この行を含む)。指定しない場合、blame は 1 行目から開始されます。

lastLine

integer

省略可。blame の範囲の終了行番号(1 から始まるインデックス、この行を含む)。指定しない場合、blame はファイルの末尾まで拡張されます。

リクエストの本文

リクエストの本文は空にする必要があります。

レスポンスの本文

gitRepositoryLinks.fetchFileBlame のレスポンス メッセージ。

成功した場合、レスポンスの本文には次の構造のデータが含まれます。

JSON 表現
{
  "ranges": [
    {
      object (BlameRange)
    }
  ]
}
フィールド
ranges[]

object (BlameRange)

ファイルの blame 範囲のリスト。

認可スコープ

次の OAuth スコープが必要です。

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

詳細については、Authentication Overview をご覧ください。

IAM 権限

name リソースに対する次の IAM 権限が必要です。

  • developerconnect.gitRepositoryLinks.fetchFileBlame

詳細については、IAM のドキュメントをご覧ください。

BlameRange

BlameRange は、行の範囲の blame 情報を表します。

JSON 表現
{
  "firstLine": integer,
  "lastLine": integer,
  "commit": {
    object (SCMCommit)
  }
}
フィールド
firstLine

integer

範囲の 1 から始まる開始行番号(この行を含む)。

lastLine

integer

範囲の 1 から始まる終了行番号(この値を含む)。

commit

object (SCMCommit)

この行範囲の commit メタデータ。