参照:https://developer.github.com/v3/pulls/#create-a-pull-request
パラメータの作り方で少しハマった
# Personal access token
TOKEN=00000000000000000
OWNER=username
REPO=repositry
COMPARE=username:branch
BASE=master
curl -v -H "Authorization: token $TOKEN" https://api.github.com/repos/$OWNER/$REPO/pulls --data '
{
"title": "Amazing new feature",
"body": "Please pull these awesome changes in!",
"head": "'$COMPARE'",
"base": "'$BASE'"
}'
--request POST
は推論されるので不要でした。
Personal access tokenの権限
repo Full control of private repositoriesがいる
- [Check] repo Full control of private repositories
- repo:status Access commit status
- repo_deployment Access deployment status
- public_repo Access public repositories
- repo:invite Access repository invitations