Method: projects.locations.connections.gitRepositoryLinks.diffCommit

Diff commits for a GitRepositoryLink.

HTTP request

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

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The resource name of the GitRepositoryLink.

Query parameters

Parameters
baseSha

string

Required. The base commit SHA or ref.

headSha

string

Required. The head commit SHA or ref.

pathFilters[]

string

Optional. Path patterns or exact paths to filter returned files. When pathFilters is specified, FileDiff.patch is populated for all matching files (use ["**"] to include patches for all changed files). When pathFilters is omitted or empty, the full list of FileDiff is returned without patch diffs (FileDiff.patch is empty).

Request body

The request body must be empty.

Response body

Response message for gitRepositoryLinks.diffCommit.

If successful, the response body contains data with the following structure:

JSON representation
{
  "files": [
    {
      object (FileDiff)
    }
  ]
}
Fields
files[]

object (FileDiff)

The file diff extracted from the unified diff.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • developerconnect.gitRepositoryLinks.diffCommit

For more information, see the IAM documentation.