GitHub:有没有办法以编程方式提交问题? [英] GitHub: Is there a way to programmatically file an issue?
本文介绍了GitHub:有没有办法以编程方式提交问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有用于提交 GitHub 问题的 API?
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.
推荐答案
这里是 GitHub API 页面,其中详细介绍了如何以编程方式创建问题:
Here is the GitHub API page which details how to programatically create an issue:
https://developer.github.com/v3/issues/#create-an-issue
示例,来自文档:
使用 JSON 向 /repos/:owner/:repo/issues
发送 POST 请求,如下所示:
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"
]
}
您还可以通过向 /repos/:owner/:repo/issues/:number
来源:https://developer.github.com/v3/问题/#edit-an-issue
这篇关于GitHub:有没有办法以编程方式提交问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文