如何使用Github GraphQL Api创建问题和标签?

Jon*_*ood 5 github-api graphql github-graphql

Api的V3为此提供了REST接口:

POST / repos /:所有者/:repo /问题

{
  "title": "Found a bug",
  "body": "I'm having a problem with this.",
  "assignees": [
    "octocat"
  ],
  "milestone": 1,
  "labels": [
    "bug"
  ]
} 
Run Code Online (Sandbox Code Playgroud)

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

您甚至可以使用GraphQL Api添加表情符号反应:

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

或评论:

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

我已经查看了可用的突变,但只能得出结论,您不能对新的Api产生问题。

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

bsw*_*ton 4

不幸的是,创建问题(或标签)的突变尚不存在。您可以在https://platform.github.community/c/graphql-api提交架构请求,GitHub 将优先创建该突变。

  • 我已经提交了一个附加请求,详细说明了所需的模式:https://platform.github.community/t/schema-request-create-issues-labels-milestones-etc/5355 谢谢@bswinnerton (2认同)