Skip to content

Instantly share code, notes, and snippets.

@jameswhite
Created September 26, 2013 15:24
Show Gist options
  • Save jameswhite/6715748 to your computer and use it in GitHub Desktop.
Save jameswhite/6715748 to your computer and use it in GitHub Desktop.
curl -u 'jameswhite:I<3t3hK@wk!'\
-X POST -d '{ "title": "${LAST_COMMIT_MSG}","body": "${LAST_COMMIT_MSG}","head": "${GITHUB_USERNAME}:lab","base": "lab"}' \
-H "Content-Type: application/json" https://api.github.com/repos/eftsource/cfengine/pulls
Works as expected
--
curl -X POST -d '{ "title": "${LAST_COMMIT_MSG}","body": "${LAST_COMMIT_MSG}","head": "${GITHUB_USERNAME}:lab","base": "lab"}' \
-H "Authorization: token ${PERSO_ACCESS_TOKEN}" \
-H "Content-Type: application/json" https://api.github.com/repos/eftsource/cfengine/pulls
"Content-Type: application/json" https://api.github.com/repos/eftsource/cfengine/pulls
{
"message": "Bad credentials",
"documentation_url": "http://developer.github.com/v3"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment