view_repositories: View repositories for a user, team or organization

Description Usage Arguments Details Value Examples

View source: R/repositories.R

Description

view_repositories() summarises the repositories for a user, team or organization in a table with the properties as columns and a row for each repository. view_repository() returns a list of a single repository's properties. browse_repository() opens the web page for the repository in the default browser.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
view_repositories(
  user,
  team,
  org,
  sort = "created",
  direction = "desc",
  n_max = 1000,
  ...
)

view_repository(repo, team, org, ...)

browse_repository(repo, ...)

Arguments

user

(string, optional) The login of the user.

team

(string, optional) The team name.

org

(string, optional) The name of the organization.

sort

(string, optional) The property to order the returned repositories by. Can be either "created", "updated", "pushed" or "full_name". Default: "created".

direction

(string, optional) The direction of the sort. Can be either "asc" or "desc". Default: "desc".

n_max

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

...

Parameters passed to gh_page() or gh_request().

repo

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

Details

You can summarise all the repositories associated with either a user, team or organization, by supplying them as an input. If neither a user or organization is specified a summary of the authenticated user's repositories is returned.

For more details see the GitHub API documentation:

Value

view_repositories() returns a tibble of repository properties. view_repository() returns a list of properties for a single repository. browse_repository() opens the default browser on the repository's page and returns the URL.

Repository 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
24
25
26
27
28
29
30
31
32
33
34
35
## Not run: 

  # View a user's repositories
  view_repositories(user = "ChadGoymer")

  # View an organization's repositories
  view_repositories(org = "HairyCoos")

  # View a team's repositories
  view_repositories(team = "Test Team", org = "HairyCoos")

  # Reorder a user's repositories
  view_repositories(
    user      = "ChadGoymer",
    sort      = "full_name",
    direction = "asc"
  )

  # View a specific user repository
  view_repository("Test repo", user = "ChadGoymer")

  # View a specific organization repository
  view_repository("Test repo", org = "HairyCoos")

  # View a specific team repository
  view_repository("Test repo", team = "Test Team", org = "HairyCoos")

  # Browse a specific user repository
  browse_repository("Test repo", user = "ChadGoymer")

  # Browse a specific organization repository
  browse_repository("Test repo", org = "HairyCoos")


## End(Not run)

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