update_issue: Update an issue in a repository

Description Usage Arguments Details Value Examples

View source: R/issues.R

Description

This function updates an issue for the specified repository in GitHub. It can be used to change the title, body, or assignees, it can also be used to replace labels and milestones, or to close the issue.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
update_issue(
  issue,
  repo,
  title,
  body,
  assignees,
  labels,
  milestone,
  state,
  ...
)

Arguments

issue

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

repo

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

title

(string, optional) The title of the issue.

body

(string, optional) The contents of the issue.

assignees

(character, optional) Logins for Users to assign to this issue. NOTE: Only users with push access can set assignees for new issues. Setting to NULL clears all assignees.

labels

(character, optional) Labels to associate with this issue. NOTE: Only users with push access can set labels for new issues. Setting to NULL clears all labels.

milestone

(character or integer, optional) The title or number of the milestone to associate this issue with. NOTE: Only users with push access can set the milestone for new issues. Setting to NULL clears the current milestone.

state

(string, optional) The state of the issue. Either "open" or "closed".

...

Parameters passed to gh_request().

Details

For more details see the GitHub API documentation:

Value

update_issue() returns a list of the issue's properties.

Issue Properties:

Examples

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

  # Update the properties of a issue
  update_issue(
    issue   = "test issue",
    repo        = "ChadGoymer/githapi",
    title       = "updated test issue",
    description = "This is an updated test issue",
    due_on      = "2020-12-01"
  )

  # Close a issue
  update_issue(
    issue = "updated test issue",
    repo      = "ChadGoymer/githapi",
    state     = "closed"
  )


## End(Not run)

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