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 = NA_character_,
  body = NA_character_,
  number = NA_integer_,
  state = NA_character_,
  created_at = format_timestamp(NA_integer_),
  closed_at = format_timestamp(NA_integer_),
  closed_by = NA_character_,
  labels = NULL,
  comments = NULL,
  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 an issue (IssueTB object, a list or a data.frame)

...

Currently not used.

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 creation date of the issue.

closed_at

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

closed_by

a string. The GitHub username of the person who closed the issue.

labels

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

comments

vector of string (the comments of the issue)

milestone

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

repo

Character. Repository name.

owner

Character. Owner name.

url

a string. The URL of the API to the GitHub issue.

html_url

a string. The URL to the GitHub 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", "not_planned" or "duplicate".

Value

a IssueTB object.

Examples

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

dput(issue)
#> structure(list(title = "Nouvelle issue", body = "Un nouveau bug pour la fonction...", 
#>     number = 47L, state = NA_character_, created_at = structure(1792627200, tzone = "UTC", class = c("POSIXct", 
#>     "POSIXt")), closed_at = structure(NA_real_, tzone = "UTC", class = c("POSIXct", 
#>     "POSIXt")), closed_by = NA_character_, labels = NULL, comments = NULL, 
#>     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_), class = "IssueTB")

issue2 <- new_issue(x = issue)