view_milestones: View milestones within a repository

Description Usage Arguments Details Value Examples

View source: R/milestones.R

Description

view_milestones() summarises milestones in a table with the properties as columns and a row for each milestone in the repository. view_milestone() returns a list of all properties for a single milestone. browse_milestone() opens the web page for the milestone in the default browser.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
view_milestones(
  repo,
  state = "open",
  sort = "due_on",
  direction = "asc",
  n_max = 1000,
  ...
)

view_milestone(milestone, repo, ...)

browse_milestone(milestone, repo, ...)

Arguments

repo

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

state

(string, optional) The state of the milestones to filter the result. Can be either "open", "closed" or "all". Default: "open".

sort

(string, optional) The property to order the returned milestones by. Can be either "due_on" or "completeness". Default: "due_on".

direction

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

n_max

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

...

Parameters passed to gh_page() or gh_request().

milestone

(string or character) The number or title of the milestone.

Details

You can summarise all the milestones of a repository in a specified state and change the order they are returned using sort and direction.

For more details see the GitHub API documentation:

Value

view_milestones() returns a tibble of milestone properties. view_milestone() returns a list of properties for a single milestone. browse_milestone() opens the default browser on the milestone's page and returns the URL.

Milestone Properties:

Examples

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

  # View open milestones in a repository
  view_milestones("ChadGoymer/githapi")

  # View closed milestones in a repository
  view_milestones("ChadGoymer/githapi", state = "closed")

  # View a single milestone
  view_milestone(
    milestone = "test milestone",
    repo      = "ChadGoymer/githapi"
  )

  # Open a milestone's page in a browser
  browse_milestone(
    milestone = "test milestone",
    repo      = "ChadGoymer/githapi"
  )


## End(Not run)

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