6

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/

Jon Wood
  • 1,531
  • 14
  • 24

1 Answers1

4

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.

bswinnerton
  • 4,533
  • 8
  • 41
  • 56
  • Hey appreciate the answer. Seems like a few other people have requested this schema already. https://platform.github.community/t/schema-request-to-create-an-issue/2250 https://platform.github.community/t/is-there-a-way-to-create-an-issue-with-graphql-api/3574 https://platform.github.community/t/how-do-i-create-an-issue/3979 Do you think you guys will implement this soon or is still going to be a while? Also is there any benefit to me adding a new request - will it help? – Jon Wood Mar 11 '18 at 17:11
  • @JonathanWood in general, mutations are slower to be added. We're still trying to identify the best way to do them. That said, a mutation to create issues will likely be one of the highest priorities because of how in demand it is. – bswinnerton Mar 16 '18 at 21:15
  • 2
    I have submitted an additional request detailing the desired schema: https://platform.github.community/t/schema-request-create-issues-labels-milestones-etc/5355 Thanks @bswinnerton – Jon Wood Mar 19 '18 at 14:23