org_secrets_repos
Creates, updates, deletes, gets or lists an org_secrets_repos resource.
Overview
| Name | org_secrets_repos |
| Type | Resource |
| Id | github.codespaces.org_secrets_repos |
Fields
The following fields are returned by SELECT queries:
- list_selected_repos_for_org_secret
Response
| Name | Datatype | Description |
|---|---|---|
repositories | array | |
total_count | integer |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_selected_repos_for_org_secret | select | org, secret_name | page, per_page | Lists all repositories that have been selected when the visibilityfor repository access to a secret is set to selected.OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. |
add_selected_repo_to_org_secret | insert | org, secret_name, repository_id | Adds a repository to an organization development environment secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret.OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. | |
set_selected_repos_for_org_secret | replace | org, secret_name, selected_repository_ids | Replaces all repositories for an organization development environment secret when the visibilityfor repository access is set to selected. The visibility is set when you Createor update an organization secret. OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. | |
remove_selected_repo_from_org_secret | delete | org, secret_name, repository_id | Removes a repository from an organization development environment secret when the visibilityfor repository access is set to selected. The visibility is set when you Createor update an organization secret. OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. |
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. |
repository_id | integer | |
secret_name | string | The name of the secret. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- list_selected_repos_for_org_secret
Lists all repositories that have been selected when the visibility
for repository access to a secret is set to selected.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
SELECT
repositories,
total_count
FROM github.codespaces.org_secrets_repos
WHERE org = '{{ org }}' -- required
AND secret_name = '{{ secret_name }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
;
INSERT examples
- add_selected_repo_to_org_secret
- Manifest
Adds a repository to an organization development environment secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
INSERT INTO github.codespaces.org_secrets_repos (
org,
secret_name,
repository_id
)
SELECT
'{{ org }}',
'{{ secret_name }}',
'{{ repository_id }}'
;
# Description fields are for documentation purposes
- name: org_secrets_repos
props:
- name: org
value: "{{ org }}"
description: Required parameter for the org_secrets_repos resource.
- name: secret_name
value: "{{ secret_name }}"
description: Required parameter for the org_secrets_repos resource.
- name: repository_id
value: {{ repository_id }}
description: Required parameter for the org_secrets_repos resource.
REPLACE examples
- set_selected_repos_for_org_secret
Replaces all repositories for an organization development environment secret when the visibility
for repository access is set to selected. The visibility is set when you Create
or update an organization secret.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
REPLACE github.codespaces.org_secrets_repos
SET
selected_repository_ids = '{{ selected_repository_ids }}'
WHERE
org = '{{ org }}' --required
AND secret_name = '{{ secret_name }}' --required
AND selected_repository_ids = '{{ selected_repository_ids }}' --required;
DELETE examples
- remove_selected_repo_from_org_secret
Removes a repository from an organization development environment secret when the visibility
for repository access is set to selected. The visibility is set when you Create
or update an organization secret.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
DELETE FROM github.codespaces.org_secrets_repos
WHERE org = '{{ org }}' --required
AND secret_name = '{{ secret_name }}' --required
AND repository_id = '{{ repository_id }}' --required
;