view_collaborators: View collaborators in an organization, repository or project

Description Usage Arguments Details Value Examples

View source: R/collaborators.R

Description

view_collaborators() summarises the collaborators in a repository, project or organization in a table with the properties as columns and a row for each collaborator. view_collaborator() returns a list of all collaborator's properties including their permission.

Usage

1
2
3
view_collaborators(repo, project, org, affiliation = "all", n_max = 1000, ...)

view_collaborator(user, repo, project, org, ...)

Arguments

repo

(string, optional) The repository specified in the format: owner/repo.

project

(integer or string, optional) Either the project number or name.

org

(string, optional) The name of the organization. Only required for projects.

affiliation

(string, optional) Filter by the affiliation of the user. This is either "outside", "direct" or "all".

n_max

(integer, optional) Maximum number to return. Default: 1000.

...

Parameters passed to gh_page() or gh_request().

user

(string) The login of the user.

Details

Note: you can only view collaborators in an organization if the authenticate user is also a member.

For more details see the GitHub API documentation:

Value

view_collaborators() returns a tibble of collaborator properties. view_collaborator() returns a list of properties for a single collaborator.

Collaborator Properties:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 

  # View collaborators on a repository
  view_collaborators(repo = "ChadGoymer/githapi")

  # View collaborators on a project
  view_collaborators(project = test_project$name, org = "HairyCoos")

  # View collaborators in an organization
  view_collaborators(org = "HairyCoos")

  # View collaborator on a repository
  view_collaborator(user = "ChadGoymer", repo = "ChadGoymer/githapi")

  # View collaborator on a project
  view_collaborator(
    user    = "ChadGoymer",
    project = "Test project",
    org     = "HairyCoos"
  )


## End(Not run)

ChadGoymer/githapi documentation built on Oct. 22, 2021, 10:56 a.m.