Carlos Pliego
Carlos Pliego

Reputation: 869

How can I update the issue body of a github issue via the api?

I can't seem to find documentation regarding this. I want to update the body or title of an issue via the API.

Any help would be greatly appreciated.

Upvotes: 2

Views: 1677

Answers (2)

VonC
VonC

Reputation: 1324606

You also have an alternative (which still uses the GitHub API): GitHub CLI gh 1.6 (Feb. 2021)

GitHub CLI now supports editing issues and pull requests, and pull request auto-merge

GitHub CLI 1.6 now includes support for editing issues and pull requests, allowing you to:

  • Edit the title or body
  • Add metadata like labels, assignees, reviewers, projects, and milestones

This latest release also supports enabling auto-merge for pull requests.

https://github.blog/wp-content/uploads/2021/02/108115726-625e3300-704f-11eb-9a26-b3c5b928253f.gif

Upvotes: 0

Carlos Pliego
Carlos Pliego

Reputation: 869

I actually found the documented solution. It is using the PATCH method. See here: https://developer.github.com/v3/issues/#edit-an-issue

PATCH /repos/:owner/:repo/issues/:number

Request Parameters: https://developer.github.com/v3/issues/#parameters-3

Upvotes: 1

Related Questions