Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create issues and labels with the Github GraphQL Api?

V3 of the Api provides a REST interface for this:

POST /repos/:owner/:repo/issues

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

https://developer.github.com/v3/issues/

You can even add an emoji reaction with the GraphQL Api:

https://developer.github.com/v4/mutation/addreaction/

Or a comment:

https://developer.github.com/v4/mutation/addcomment/

I have looked at the mutations available and I can only conclude that you cannot make an issue with the new Api.

https://developer.github.com/v4/mutation/

like image 896
Jonathan Wood Avatar asked Feb 28 '18 16:02

Jonathan Wood


1 Answers

Unfortunately a mutation to create issues (or labels) does not exist yet. You can submit a schema request at https://platform.github.community/c/graphql-api and GitHub will prioritize the creation of that mutation.

like image 124
bswinnerton Avatar answered Nov 17 '22 00:11

bswinnerton