Skip to main content

org_dependabot_repository_access

Creates, updates, deletes, gets or lists an org_dependabot_repository_access resource.

Overview

Nameorg_dependabot_repository_access
TypeResource
Idgithub.dependabot.org_dependabot_repository_access

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
accessible_repositoriesarray
default_levelstringThe default repository access level for Dependabot updates. (public, internal) (example: internal)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
repository_access_for_orgselectorgpage, per_pageLists repositories that organization admins have allowed Dependabot to access when updating dependencies.
> [!NOTE]
> This operation supports both server-to-server and user-to-server access.
Unauthorized users will not see the existence of this endpoint.
update_repository_access_for_orgupdateorgUpdates repositories according to the list of repositories that organization admins have given Dependabot access to when they've updated dependencies.

> [!NOTE]
> This operation supports both server-to-server and user-to-server access.
Unauthorized users will not see the existence of this endpoint.

Example request body:
json<br />&#123;<br /> "repository_ids_to_add": [123, 456],<br /> "repository_ids_to_remove": [789]<br />&#125;<br />
set_repository_access_default_levelreplaceorg, default_levelSets the default level of repository access Dependabot will have while performing an update. Available values are:
- 'public' - Dependabot will only have access to public repositories, unless access is explicitly granted to non-public repositories.
- 'internal' - Dependabot will only have access to public and internal repositories, unless access is explicitly granted to private repositories.

Unauthorized users will not see the existence of this endpoint.

This operation supports both server-to-server and user-to-server access.

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
orgstringThe organization name. The name is not case sensitive.
pageintegerThe page number of results to fetch.
per_pageintegerNumber of results per page.

SELECT examples

Lists repositories that organization admins have allowed Dependabot to access when updating dependencies.
> [!NOTE]
> This operation supports both server-to-server and user-to-server access.
Unauthorized users will not see the existence of this endpoint.

SELECT
accessible_repositories,
default_level
FROM github.dependabot.org_dependabot_repository_access
WHERE org = '{{ org }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
;

UPDATE examples

Updates repositories according to the list of repositories that organization admins have given Dependabot access to when they've updated dependencies.

> [!NOTE]
> This operation supports both server-to-server and user-to-server access.
Unauthorized users will not see the existence of this endpoint.

Example request body:
json<br />&#123;<br /> "repository_ids_to_add": [123, 456],<br /> "repository_ids_to_remove": [789]<br />&#125;<br />

UPDATE github.dependabot.org_dependabot_repository_access
SET
repository_ids_to_add = '{{ repository_ids_to_add }}',
repository_ids_to_remove = '{{ repository_ids_to_remove }}'
WHERE
org = '{{ org }}' --required;

REPLACE examples

Sets the default level of repository access Dependabot will have while performing an update. Available values are:
- 'public' - Dependabot will only have access to public repositories, unless access is explicitly granted to non-public repositories.
- 'internal' - Dependabot will only have access to public and internal repositories, unless access is explicitly granted to private repositories.

Unauthorized users will not see the existence of this endpoint.

This operation supports both server-to-server and user-to-server access.

REPLACE github.dependabot.org_dependabot_repository_access
SET
default_level = '{{ default_level }}'
WHERE
org = '{{ org }}' --required
AND default_level = '{{ default_level }}' --required;