Create a new IssuesTB object

new_issues(x = NULL, ...)

# S3 method for class 'IssueTB'
new_issues(x, ...)

# S3 method for class 'IssuesTB'
new_issues(x, ...)

# S3 method for class 'data.frame'
new_issues(x, ...)

# S3 method for class 'list'
new_issues(x, ...)

# Default S3 method
new_issues(
  x,
  title,
  body,
  number,
  state,
  created_at = Sys.Date(),
  labels = list(),
  comments = list(),
  milestone = NA_character_,
  repo = NA_character_,
  owner = NA_character_,
  url = NA_character_,
  html_url = NA_character_,
  creator = NA_character_,
  assignee = NA_character_,
  state_reason = NA_character_,
  ...
)

Arguments

x

a object representing a list of issues (IssuesTB object, a list or a data.frame)

...

Other information we would like to add to the issue.

title

a vector of string. The titles of the issues.

body

a vector of string. The bodies (text) of the issues.

number

a vector of string. The numbers of the issues.

state

a vector of string that is either "open" (by default) if the issues are still open or "closed" if the issues are now closed.

created_at

a vector of date (or timestamp). The creation dates of the issues.

labels

a list of vector string (or missing). The labels of the issues.

comments

a list of vector string. The comments of the issues.

milestone

a vector of string (or missing). The milestones of the issues.

repo

A character string specifying the GitHub repository name (only taken into account if source is set to "online"). Defaults to the package option IssueTrackeR.repo.

owner

A character string specifying the GitHub owner (only taken into account if source is set to "online"). Defaults to the package option IssueTrackeR.owner.

url

a vector of string. The URLs of the API to the GitHub issues.

html_url

a vector of string. The URLs to the GitHub issues.

creator

a vector of string. The GitHub usernames of the creator of the issues.

assignee

a vector of string. The GitHub usernames of the assignee of the issues.

state_reason

a vector of string. "open", "completed", "reopened" or "not_planned".

Value

a IssuesTB object.

Examples

# Empty list of issues
issues1 <- new_issues()

# List of issues from issue
issue1 <- new_issue(
    title = "Une autre issue",
    state = "open",
    body = "J'ai une question au sujet de...",
    number = 2,
    created_at = Sys.Date()
)
issues2 <- new_issues(x = issue1)

# Custom issues
issues3 <- new_issues(
    title = "Une autre issue",
    state = "open",
    body = "J'ai une question au sujet de...",
    number = 2,
    created_at = Sys.Date()
)

issues4 <- new_issues(
    title = c("Nouvelle issue", "Une autre issue"),
    body = c("Un nouveau bug pour la fonction...",
             "J'ai une question au sujet de..."),
    state = c("open", "closed"),
    number = 1:2,
    created_at = Sys.Date()
)