ga_workflows: GitHub Workflows

ga_workflow_listR Documentation

GitHub Workflows

Description

GitHub Workflows

Usage

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

ga_workflow_runs(
  owner,
  repo = NULL,
  workflow_id,
  page = NULL,
  per_page = NULL,
  ...
)

ga_workflow_runs_table(...)

ga_workflow(owner, repo = NULL, workflow_id, ...)

ga_workflow_usage(owner, repo = NULL, workflow_id, ...)

ga_workflow_disable(owner, repo = NULL, workflow_id, ...)

ga_workflow_enable(owner, repo = NULL, workflow_id, ...)

ga_workflow_dispatch(owner, repo = NULL, workflow_id, ref, ...)

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()

workflow_id

identifier of workflow

ref

The git reference for the workflow. The reference can be a branch or tag name.

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) {
  w = ga_workflow_list("muschellij2/pycwa", page = 1)
  w = ga_workflow_list("muschellij2", "pycwa")
  workflow_id = w$workflows[[1]]$id
}

if (have_token) {
  runs = ga_workflow_runs("muschellij2", "pycwa", workflow_id)
  flow = ga_workflow("muschellij2", "pycwa", workflow_id)
  usage = ga_workflow_usage("muschellij2", "pycwa", workflow_id)
}

## End(Not run)

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