| Title: | Trustdown Interface for R |
|---|---|
| Description: | An R interface for the vouch project, which bills itself as "a community trust management system based on explicit vouches to participate". vouch is a Nushell module, so voucher provides an R API to modify the VOUCHED.td database without Nushell. voucher does not depend on vouch or Nushell. |
| Authors: | Visruth Srimath Kandali [aut, cre, cph] (ORCID: <https://orcid.org/0009-0005-9097-0688>) |
| Maintainer: | Visruth Srimath Kandali <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.0.0 |
| Built: | 2026-02-26 18:08:20 UTC |
| Source: | https://github.com/VisruthSK/voucher |
This adds the user to the vouched list, removing any existing entry (vouched or denounced) for that user first.
add(username, write = FALSE, default_platform = "", vouched_file = "")add(username, write = FALSE, default_platform = "", vouched_file = "")
username |
Username to vouch for (supports |
write |
Write the file in-place (default: output to stdout). |
default_platform |
Assumed platform for entries without explicit platform. |
vouched_file |
Path to vouched contributors file (default:
|
Invisibly returns the updated trustdown text.
Documentation for this function is copied nearly verbatim from vouch and is owned by Mitchell Hashimoto.
## Not run: # Preview new file contents (default) add("someuser") # Write the file in-place add("someuser", write = TRUE) # Add with platform prefix add("github:someuser", write = TRUE) ## End(Not run)## Not run: # Preview new file contents (default) add("someuser") # Write the file in-place add("someuser", write = TRUE) # Add with platform prefix add("github:someuser", write = TRUE) ## End(Not run)
This checks if a user is vouched, denounced, or unknown.
check(username, default_platform = "", vouched_file = "", blame = FALSE)check(username, default_platform = "", vouched_file = "", blame = FALSE)
username |
Username to check (supports |
default_platform |
Assumed platform for entries without explicit platform. |
vouched_file |
Path to vouched contributors file (default:
|
blame |
Include git blame author for a matched entry when available. |
One of "vouched", "denounced", or "unknown".
Documentation for this function is copied nearly verbatim from vouch and is owned by Mitchell Hashimoto.
## Not run: check("someuser") check("github:someuser") ## End(Not run)## Not run: check("someuser") check("github:someuser") ## End(Not run)
This removes any existing entry for the user and adds them as denounced. An optional reason can be provided which will be added after the username.
denounce( username, write = FALSE, reason = "", default_platform = "", vouched_file = "" )denounce( username, write = FALSE, reason = "", default_platform = "", vouched_file = "" )
username |
Username to denounce (supports |
write |
Write the file in-place (default: output to stdout). |
reason |
Optional reason for denouncement. |
default_platform |
Assumed platform for entries without explicit platform. |
vouched_file |
Path to vouched contributors file (default:
|
Invisibly returns the updated trustdown text.
Documentation for this function is copied nearly verbatim from vouch and is owned by Mitchell Hashimoto.
## Not run: # Preview new file contents (default) denounce("badactor") # Denounce with a reason denounce("badactor", reason = "Submitted AI slop") # Write the file in-place denounce("badactor", write = TRUE) # Denounce with platform prefix denounce("github:badactor", write = TRUE) ## End(Not run)## Not run: # Preview new file contents (default) denounce("badactor") # Denounce with a reason denounce("badactor", reason = "Submitted AI slop") # Write the file in-place denounce("badactor", write = TRUE) # Denounce with platform prefix denounce("github:badactor", write = TRUE) ## End(Not run)
Creates a starter VOUCHED.td file at .github/VOUCHED.td and ensures
.github is ignored in package builds by adding ^\\.github$ to
.Rbuildignore when needed.
use_vouch()use_vouch()
If a vouch file already exists (VOUCHED.td or .github/VOUCHED.td), this
function exits without making changes.
Invisibly returns NULL.
## Not run: use_vouch() ## End(Not run)## Not run: use_vouch() ## End(Not run)
Function to add some vouch workflows, like usethis::use_github_action().
Details about the actions can be found at
https://github.com/mitchellh/vouch/tree/main/action; short summaries
copied from there follow.
vouch_gha( action = c("check-issue", "check-pr", "manage-by-discussion", "manage-by-issue", "sync-codeowners") )vouch_gha( action = c("check-issue", "check-pr", "manage-by-discussion", "manage-by-issue", "sync-codeowners") )
action |
The GitHub Action template workflow to add. |
check-issue: Check if an issue author is a vouched contributor. Bots and collaborators with write access are automatically allowed. Denounced users are always blocked. When require-vouch is true (default), unvouched users are also blocked. Use auto-close to close issues from blocked users.
check-pr: Check if a PR author is a vouched contributor. Bots and collaborators with write access are automatically allowed. Denounced users are always blocked. When require-vouch is true (default), unvouched users are also blocked. Use auto-close to close PRs from blocked users.
manage-by-discussion: Manage contributor vouch status via discussion comments. When a collaborator with sufficient permissions comments vouch on a discussion, the discussion author is added to the vouched contributors list. When they comment denounce, the user is denounced. When they comment unvouch, the user is removed from the list entirely. The trigger keywords and required permission levels are configurable.
manage-by-issue: Manage contributor vouch status via issue comments. When a collaborator with sufficient permissions comments vouch on an issue, the issue author is added to the vouched contributors list. When they comment denounce, the user is denounced. When they comment unvouch, the user is removed from the list entirely. The trigger keywords and required permission levels are configurable.
sync-codeowners: Sync CODEOWNERS entries into the VOUCHED list. The action expands any team owners to their members and adds missing users to the vouch file.
Documentation for this function is copied nearly verbatim from vouch and is owned by Mitchell Hashimoto.