This function will add (or update) the touchstone GitHub Actions workflows to your package repository. Use in the root directory of your repository. This function will be called by use_touchstone(), you should only need to call it to update the workflows or change their parameters.

use_touchstone_workflows(
  overwrite = FALSE,
  command = NULL,
  limit_to = c("OWNER", "MEMBER", "COLLABORATOR"),
  force_upstream = TRUE
)

Arguments

overwrite

Overwrites files if they exist.

command

If set to NULL (the default) will run the workflow on every commit. If set to a command (e.g. /benchmark) the benchmark will only run when triggered with a comment on the PR starting with the command.

limit_to

Roles that are allowed to trigger the benchmark workflow via comment. See details for a list of roles and their definition. Set to NULL to allow everyone to trigger a benchmark.

force_upstream

Always benchmark against the upstream base branch.

Value

The function is called for its side effects and returns NULL (invisibly).

Details

Possible roles for limit_to:

  • OWNER: Owner of the repository, e.g. user for user/repo.

    • It is undocumented who holds this status in an org.

  • MEMBER: Member of org for org/repo.

  • COLLABORATOR: Anyone who was added as a collaborator to a repository.

  • CONTRIBUTOR: Anyone who has contributed any commit to the repository.

Each user has only one role and the check does not interpolate permissions, so you have to add all roles whom you want to have permission to start the benchmark. So if you only add "COLLABORATOR" the owner will not be able to start the benchmark.

GitHub will recognize additional, mostly unusual roles, see the documentation.