Method: projects.locations.connections.gitRepositoryLinks.fetchCommitList

Fetch a list of Commits from a Git repository link.

HTTP request

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

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The resource name of the GitRepositoryLink in the format projects/*/locations/*/connections/*/gitRepositoryLinks/*.

Query parameters

Parameters
ref

string

Optional. The commit SHA, or symbolic revision (for example, branch name, tag, or Git reference) from which to start listing commits.

pageSize

integer

Optional. Number of results to return in the list. Default is 50. Max is 100.

pageToken

string

Optional. A page token, received from a previous gitRepositoryLinks.fetchCommitList call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to gitRepositoryLinks.fetchCommitList must match the call that provided the page token.

view

enum (CommitView)

Optional. The level of commit details to return in the response. Only BASIC is supported; FULL returns INVALID_ARGUMENT. Defaults to BASIC if unspecified. Use gitRepositoryLinks.fetchCommit to get file diffs for a single commit.

Request body

The request body must be empty.

Response body

Response message for gitRepositoryLinks.fetchCommitList.

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

JSON representation
{
  "commits": [
    {
      object (SCMCommit)
    }
  ],
  "nextPageToken": string
}
Fields
commits[]

object (SCMCommit)

The list of commit metadata.

nextPageToken

string

A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no subsequent pages.

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.fetchCommitList

For more information, see the IAM documentation.