4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GithubにPull Requestするときのトークンのscope

Posted at

GithubにAPI経由でPull Requestを作るときに、トークンに必要なscopeを調べたところ、public_repo scopeが必要でした。

Edit_personal_access_token.png

トークンを指定していない、またはトークンに必要なscopeがないと、404エラーが返されます。

% curl -X POST https://api.github.com/repos/:owner/:repo/pulls
{
  "message": "Not Found",
  "documentation_url": "https://developer.github.com/v3/pulls/#create-a-pull-request"
}

調べるのに30分かかった。

参考: Github REST API V3 Reference

4
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?