ga_secrets: GitHub Actions Secrets

View source: R/secrets.R

ga_secretsR Documentation

GitHub Actions Secrets

Description

GitHub Actions Secrets

Usage

ga_secrets(owner, repo = NULL, page = NULL, per_page = NULL, ...)

ga_secret(owner, repo = NULL, secret_name, ...)

ga_secret_delete(owner, repo = NULL, secret_name, ...)

ga_secret_public_key(owner, repo = NULL, ...)

ga_secret_update(owner, repo = NULL, secret_name, secret, ...)

ga_secret_create(owner, repo = NULL, secret_name, secret, ...)

ga_org_secrets(org, page = NULL, per_page = NULL, ...)

ga_org_secret_public_key(org, ...)

ga_org_secret(org, secret_name, ...)

ga_org_secret_update(
  org,
  secret_name,
  secret,
  visibility = c("all", "private", "selected"),
  selected_repository_ids = NULL,
  ...
)

ga_org_secret_create(
  org,
  secret_name,
  secret,
  visibility = c("all", "private", "selected"),
  selected_repository_ids = NULL,
  ...
)

Arguments

owner

owner of repo/username

repo

repository name

page

page to query. If NULL, then will iterate through all pages

per_page

number of results per page.

...

additional arguments to pass to gh::gh()

secret_name

name of the secret you are updating or creating

secret

value of the secret that you are updating

org

organization identifier

visibility

for keys, what visibility should it have: all - All repositories in an organization can access the secret. private - Private repositories in an organization can access the secret. selected - Only specific repositories can access the secret.

selected_repository_ids

identifiers of repositories if visibility is selected

Value

Answer from the API as a ga_response object, which is also a list. Failed requests will generate an R error. Requests that generate a raw response will return a raw vector.

Examples

## Not run: 
  have_token = length(gh::gh_token()) > 0
  if (have_token) {
    secrets = ga_secrets("muschellij2/pycwa")
    secrets$secrets[[1]]
    # ga_secret_public_key("muschellij2/pycwa")
    ga_secret_update("muschellij2/pycwa", secret_name = "TEST",
    secret = as.character(Sys.time()))
    ga_secret("muschellij2/pycwa", secret_name = "TEST")
  }

## End(Not run)

muschellij2/aghast documentation built on Nov. 7, 2024, 9:36 p.m.