Skip to main content

repos

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

Overview

Namerepos
TypeResource
Idvercel.integrations.repos

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring
namestring
default_branchstring (wire: defaultBranch)
namespacestring
ownerobject
owner_typestring (team, user) (wire: ownerType)
privateboolean (false, true)
providerstring (cursor-origin)
slugstring
updated_atnumber (wire: updatedAt)
urlstring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
searchselectquery, namespace_id, provider, installation_id, host, team_id, slugLists git repositories linked to a namespace id for a supported provider. A specific namespace id can be obtained via the git-namespaces endpoint. Supported providers are github, gitlab and bitbucket. If the provider or namespace is not provided, it will try to obtain it from the user that authenticated the request.

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
hoststringThe custom Git host if using a custom Git provider, like GitHub Enterprise Server
installation_idstring (wire: installationId)
namespace_id (wire: namespaceId)
provider
querystring
slugstringThe Team slug to perform the request on behalf of.
team_idstringThe Team identifier to perform the request on behalf of. (wire: teamId)

SELECT examples

Lists git repositories linked to a namespace id for a supported provider. A specific namespace id can be obtained via the git-namespaces endpoint. Supported providers are github, gitlab and bitbucket. If the provider or namespace is not provided, it will try to obtain it from the user that authenticated the request.

SELECT
id,
name,
default_branch,
namespace,
owner,
owner_type,
private,
provider,
slug,
updated_at,
url
FROM vercel.integrations.repos
WHERE query = '{{ query }}'
AND namespace_id = '{{ namespace_id }}'
AND provider = '{{ provider }}'
AND installation_id = '{{ installation_id }}'
AND host = '{{ host }}'
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;