Skip to main content

repositories_git_refs

Creates, updates, deletes, gets or lists a repositories_git_refs resource.

Overview​

Namerepositories_git_refs
TypeResource
Idgoogle.cloudbuild.repositories_git_refs

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
nextPageTokenstringA token identifying a page of results the server should return.
refNamesarrayName of the refs fetched.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_connections_repositories_fetch_git_refsselectprojectsId, locationsId, connectionsId, repositoriesIdpageSize, pageToken, refTypeFetch the list of branches or tags for a given repository.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
connectionsIdstring
locationsIdstring
projectsIdstring
repositoriesIdstring
pageSizeinteger (int32)
pageTokenstring
refTypestring

SELECT examples​

Fetch the list of branches or tags for a given repository.

SELECT
nextPageToken,
refNames
FROM google.cloudbuild.repositories_git_refs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionsId = '{{ connectionsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND refType = '{{ refType }}'
;