I’m trying to send an API call to GitHub to create a PR if a branch starting with feature/
is successful.
deployment:
feature:
branch: /feature\/.*/
commands:
- curl -X POST -H "Authorization: 'token $GITHUB_TOKEN'" -d "{'base':'master','head':'$CIRCLE_BRANCH','title':'Merge with $CIRCLE_BRANCH'}" https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls
I have tried a bunch of variations of this, but always getting less than straightforward error messages from the circle.yml parser. Is there something I’m clearly doing wrong?
Note: the build fails, not the API call.