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
)
Overwrites files if they exist.
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.
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.
Always benchmark against the upstream base branch.
The function is called for its side effects and returns NULL
(invisibly).
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.