Skip to main content

repos_for_secret

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

Overview

Namerepos_for_secret
TypeResource
Idgithub.dependabot.repos_for_secret

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idinteger (int64)
namestring (example: Hello-World)
node_idstring (example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5)
full_namestring (example: octocat/Hello-World)
role_namestring (example: admin)
allow_forkingboolean
archive_urlstring (example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref})
archivedboolean
assignees_urlstring (example: http://api.github.com/repos/octocat/Hello-World/assignees{/user})
blobs_urlstring (example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha})
branches_urlstring (example: http://api.github.com/repos/octocat/Hello-World/branches{/branch})
clone_urlstring
code_of_conductobjectCode Of Conduct (title: Code Of Conduct)
collaborators_urlstring (example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator})
comments_urlstring (example: http://api.github.com/repos/octocat/Hello-World/comments{/number})
commits_urlstring (example: http://api.github.com/repos/octocat/Hello-World/commits{/sha})
compare_urlstring (example: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head})
contents_urlstring (example: http://api.github.com/repos/octocat/Hello-World/contents/{+path})
contributors_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/contributors)
created_atstring (date-time) (example: 2011-01-26T19:01:12Z)
custom_propertiesobjectThe custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values.
default_branchstring
delete_branch_on_mergeboolean
deployments_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/deployments)
descriptionstring (example: This your first repo!)
disabledboolean
downloads_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/downloads)
events_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/events)
forkboolean
forksinteger
forks_countinteger
forks_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/forks)
git_commits_urlstring (example: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha})
git_refs_urlstring (example: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha})
git_tags_urlstring (example: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha})
git_urlstring
has_discussionsboolean
has_downloadsboolean
has_issuesboolean
has_pagesboolean
has_projectsboolean
has_pull_requestsboolean
has_wikiboolean
homepagestring
hooks_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/hooks)
html_urlstring (uri) (example: https://github.com/octocat/Hello-World)
is_templateboolean
issue_comment_urlstring (example: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number})
issue_events_urlstring (example: http://api.github.com/repos/octocat/Hello-World/issues/events{/number})
issues_urlstring (example: http://api.github.com/repos/octocat/Hello-World/issues{/number})
keys_urlstring (example: http://api.github.com/repos/octocat/Hello-World/keys{/key_id})
labels_urlstring (example: http://api.github.com/repos/octocat/Hello-World/labels{/name})
languagestring
languages_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/languages)
licenseobject
merges_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/merges)
milestones_urlstring (example: http://api.github.com/repos/octocat/Hello-World/milestones{/number})
mirror_urlstring
network_countinteger
notifications_urlstring (example: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating})
open_issuesinteger
open_issues_countinteger
ownerobjectA GitHub user. (title: Simple User)
permissionsobject
privateboolean
pull_request_creation_policystringThe policy controlling who can create pull requests: all or collaborators_only. (all, collaborators_only)
pulls_urlstring (example: http://api.github.com/repos/octocat/Hello-World/pulls{/number})
pushed_atstring (date-time) (example: 2011-01-26T19:06:43Z)
releases_urlstring (example: http://api.github.com/repos/octocat/Hello-World/releases{/id})
security_and_analysisobject
sizeintegerThe size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
ssh_urlstring
stargazers_countinteger
stargazers_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/stargazers)
statuses_urlstring (example: http://api.github.com/repos/octocat/Hello-World/statuses/{sha})
subscribers_countinteger
subscribers_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/subscribers)
subscription_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/subscription)
svn_urlstring
tags_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/tags)
teams_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/teams)
temp_clone_tokenstring
topicsarray
trees_urlstring (example: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha})
updated_atstring (date-time) (example: 2011-01-26T19:14:43Z)
urlstring (uri) (example: https://api.github.com/repos/octocat/Hello-World)
visibilitystring
watchersinteger
watchers_countinteger
web_commit_signoff_requiredboolean

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_selected_repos_for_org_secretselectorg, secret_namepage, per_pageLists 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.
add_selected_repo_to_org_secretinsertorg, secret_name, repository_idAdds a repository to an organization 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_secretreplaceorg, secret_name, selected_repository_idsReplaces all repositories for an organization 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.
remove_selected_repo_from_org_secretdeleteorg, secret_name, repository_idRemoves a repository from an organization 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.

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.
repository_idinteger
secret_namestringThe name of the secret.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

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
id,
name,
node_id,
full_name,
role_name,
allow_forking,
archive_url,
archived,
assignees_url,
blobs_url,
branches_url,
clone_url,
code_of_conduct,
collaborators_url,
comments_url,
commits_url,
compare_url,
contents_url,
contributors_url,
created_at,
custom_properties,
default_branch,
delete_branch_on_merge,
deployments_url,
description,
disabled,
downloads_url,
events_url,
fork,
forks,
forks_count,
forks_url,
git_commits_url,
git_refs_url,
git_tags_url,
git_url,
has_discussions,
has_downloads,
has_issues,
has_pages,
has_projects,
has_pull_requests,
has_wiki,
homepage,
hooks_url,
html_url,
is_template,
issue_comment_url,
issue_events_url,
issues_url,
keys_url,
labels_url,
language,
languages_url,
license,
merges_url,
milestones_url,
mirror_url,
network_count,
notifications_url,
open_issues,
open_issues_count,
owner,
permissions,
private,
pull_request_creation_policy,
pulls_url,
pushed_at,
releases_url,
security_and_analysis,
size,
ssh_url,
stargazers_count,
stargazers_url,
statuses_url,
subscribers_count,
subscribers_url,
subscription_url,
svn_url,
tags_url,
teams_url,
temp_clone_token,
topics,
trees_url,
updated_at,
url,
visibility,
watchers,
watchers_count,
web_commit_signoff_required
FROM github.dependabot.repos_for_secret
WHERE org = '{{ org }}' -- required
AND secret_name = '{{ secret_name }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
;

INSERT examples

Adds a repository to an organization 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.dependabot.repos_for_secret (
org,
secret_name,
repository_id
)
SELECT
'{{ org }}',
'{{ secret_name }}',
'{{ repository_id }}'
;

REPLACE examples

Replaces all repositories for an organization 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.dependabot.repos_for_secret
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

Removes a repository from an organization 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.dependabot.repos_for_secret
WHERE org = '{{ org }}' --required
AND secret_name = '{{ secret_name }}' --required
AND repository_id = '{{ repository_id }}' --required
;