notes/git_from_cli.txt
2022-08-10 07:11:12 -07:00

16 lines
668 B
Text

# Create github repository from cli
curl -u $USER:$GH_TOKEN https://api.github.com/user/repos -d '{"name": "testrepo"}'
# Delete github repository from cli
curl -i -H 'Authorization: token $GH_TOKEN' -X 'DELETE' https://api.github.com/repos/$USER/testrepo --http1.1
# View pull requests
curl https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/pulls
# Create pull request
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token <TOKEN>" \
https://api.github.com/repos/OWNER/REPO/pulls \
-d '{"title":"Amazing new feature","body":"Please pull these awesome changes in!","head":"octocat:new-feature","base":"master"}' --http1.1