【问题标题】:Adding comment to the pull request throws "Message: Not Found" error向拉取请求添加注释会引发“消息:未找到”错误
【发布时间】:2019-01-10 20:06:38
【问题描述】:

我正在尝试使用 GitHub API 向拉取请求添加提交以解决问题。但是看到错误

curl -H "Authorization: token "Key"" -X POST -d '{"body": "Failed"}' "https://github-site/repos/:repository/issues/PR_NUMBER/comments"

curl 命令的响应。

{ “未找到信息”, "documentation_url": "https://developer.github.com/enterprise/2.15/v3/issues/comments/#create-a-comment" }

【问题讨论】:

    标签: github-api-v3


    【解决方案1】:

    啊,我发现了我的错误。我正在传递基本的授权密钥。要发表评论或创建标签,我们需要在 github 上生成 OAUTH 令牌。

    https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-27
      • 2017-05-13
      • 1970-01-01
      • 2018-11-01
      • 2020-07-29
      • 1970-01-01
      相关资源
      最近更新 更多