Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub: Is there a way to programmatically file an issue?

Is there an API for filing a GitHub issue?

When I have an unexpected issue I would like to offer the user an option to automatically report an issue.

like image 385
Mark Harrison Avatar asked Aug 02 '15 00:08

Mark Harrison


1 Answers

Here is the GitHub API page which details how to programatically create an issue:

https://developer.github.com/v3/issues/#create-an-issue

Example, from the docs:

Send a POST request to /repos/:owner/:repo/issues with JSON like the following:

{
  "title": "Found a bug",
  "body": "I'm having a problem with this.",
  "assignee": "octocat",
  "milestone": 1,
  "labels": [
    "Label1",
    "Label2"
  ]
}

You can also edit issues programatically by sending a PATCH request to /repos/:owner/:repo/issues/:number

Source: https://developer.github.com/v3/issues/#edit-an-issue

like image 179
Maximillian Laumeister Avatar answered Oct 04 '22 00:10

Maximillian Laumeister