Create a new IssueTB object

new_issue(x = NULL, ...)

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

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

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

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

# Default S3 method
new_issue(
  x,
  title,
  body,
  number,
  state = c("open", "closed"),
  created_at = Sys.Date(),
  labels = NULL,
  milestone = NA_character_,
  repo = NA_character_,
  owner = NA_character_,
  url = NA_character_,
  html_url = NA_character_,
  comments = NULL,
  creator = NA_character_,
  assignee = NA_character_,
  state_reason = NA_character_,
  ...
)

Arguments

x

a object representing an issue (IssueTB object, a list or a data.frame)

...

Other information we would like to add to the issue.

title

a string. The title of the issue.

body

a string. The body (text) of the issue.

number

a string. The number of the issue.

state

a string that is either "open" (by default) if the issue is still open or "closed" if the issue is now closed.

created_at

a date (or timestamp). The title of the issue.

labels

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

milestone

a string (or missing). The milestone of the issue.

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 string. The URL of the API to the GitHub issue.

html_url

a string. The URL to the GitHub issue.

comments

vector of string (the comments of the issue)

creator

a string. The GitHub username of the creator of the issue.

assignee

a string. The GitHub username of the assignee of the issue.

state_reason

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

Value

a IssueTB object.

Examples

# Empty issue
issue1 <- new_issue()

# Custom issue
issue1 <- new_issue(
    title = "Nouvelle issue",
    body = "Un nouveau bug pour la fonction...",
    number = 47,
    created_at = Sys.Date()
)

issue2 <- new_issue(x = issue1)