Skip to content

Instantly share code, notes, and snippets.

@pbharadiya
Created October 2, 2018 18:18
Show Gist options
  • Save pbharadiya/90d87a538b9fedafbe0ff499feb203c6 to your computer and use it in GitHub Desktop.
Save pbharadiya/90d87a538b9fedafbe0ff499feb203c6 to your computer and use it in GitHub Desktop.
#!/bin/bash
array=( 15354 15359 )
for i in "${array[@]}"
do
# do whatever on $i
echo "-------------------"
PULL_ID=$i
cwd=$(pwd)
TOKEN="YOUR_GITHUB_TOKEN"
curl -H "Authorization: token $TOKEN" -H "Accept: application/vnd.github.v3.patch" https://api.github.com/repos/amuratech/crm/pulls/$PULL_ID | git am
echo "done with $PULL_ID"
echo "-------------------"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment