Learn R Programming

ghclass (version 0.4.0)

org_perm: Organization permissions

Description

  • org_sitrep() - Provides a situation report on a GitHub organization.

  • org_set_repo_permission() - Change the default permission level for org repositories.

  • org_workflow_permissions() - Obtain the current default workflow permission value for the organization.

  • org_set_workflow_permissions() - Change the current default workflow permission value for the organization.

  • org_allows_forking() - returns TRUE if members can fork private repositories in the organization.

Usage

org_allows_forking(org)

org_sitrep(org)

org_set_repo_permission( org, repo_permission = c("none", "read", "write", "admin") )

org_workflow_permissions(org)

org_set_workflow_permissions(org, workflow_permission = c("read", "write"))

Value

org_sitep() invisibly returns the org argument.

org_set_repo_permission() invisibly return a the result of the relevant GitHub API call.

org_workflow_permissions() returns a character vector with value of either "read" or "write".

org_set_workflow_permissions() invisibly return a the result of the relevant GitHub API call.

org_allows_forking() returns a logical scalar.

Arguments

org

Character. Name of the GitHub organization(s).

repo_permission

Default permission level members have for organization repositories:

  • read - can pull, but not push to or administer this repository.

  • write - can pull and push, but not administer this repository.

  • admin - can pull, push, and administer this repository.

  • none - no permissions granted by default.

workflow_permission

The default workflow permissions granted to the GITHUB_TOKEN when running workflows in the organization. Accepted values:"read" or "write".

Examples

Run this code
if (FALSE) {
org_sitrep("ghclass-test")

org_set_repo_permission("ghclass-test", "read")

org_workflow_permissions("ghclass-test")

org_set_workflow_permissions("ghclass-test", "write")

org_sitrep("ghclass-test")

# Cleanup
org_set_repo_permission("ghclass-test", "none")
org_set_workflow_permissions("ghclass-test", "read")
}

Run the code above in your browser using DataLab