org_dependabot_repository_access
Creates, updates, deletes, gets or lists an org_dependabot_repository_access resource.
Overview
| Name | org_dependabot_repository_access |
| Type | Resource |
| Id | github.dependabot.org_dependabot_repository_access |
Fields
The following fields are returned by SELECT queries:
- repository_access_for_org
Response
| Name | Datatype | Description |
|---|---|---|
accessible_repositories | array | |
default_level | string | The default repository access level for Dependabot updates. (public, internal) (example: internal) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
repository_access_for_org | select | org | page, per_page | 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. |
update_repository_access_for_org | update | org | 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 />{<br /> "repository_ids_to_add": [123, 456],<br /> "repository_ids_to_remove": [789]<br />}<br /> | |
set_repository_access_default_level | replace | org, default_level | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
org | string | The organization name. The name is not case sensitive. |
page | integer | The page number of results to fetch. |
per_page | integer | Number of results per page. |
SELECT examples
- repository_access_for_org
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
- update_repository_access_for_org
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 />{<br /> "repository_ids_to_add": [123, 456],<br /> "repository_ids_to_remove": [789]<br />}<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
- set_repository_access_default_level
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;