11#! /bin/bash
22set -euo pipefail
33
4- git clone " https://${GH_TURBINE_TOKEN } @github.com/OneSignal/turbine.git" turbine
4+ git clone " https://${GH_PUSH_TOKEN } @github.com/OneSignal/turbine.git" turbine
55cd turbine
66
77# Configure git identity
@@ -13,12 +13,12 @@ BRANCH_NAME="web-sdk-${SDK_VERSION}-release"
1313
1414# Close any existing PRs for this branch
1515curl -s \
16- -H " Authorization: Bearer $GH_TURBINE_TOKEN " \
16+ -H " Authorization: Bearer $GH_PUSH_TOKEN " \
1717 " https://api.github.com/repos/OneSignal/turbine/pulls?head=OneSignal:$BRANCH_NAME &state=open" |
1818 jq -r ' .[].number' | while read PR_NUM; do
1919 echo " Closing existing PR #$PR_NUM "
2020 curl -sS -X PATCH \
21- -H " Authorization: Bearer $GH_TURBINE_TOKEN " \
21+ -H " Authorization: Bearer $GH_PUSH_TOKEN " \
2222 -H " Content-Type: application/json" \
2323 -d ' {"state": "closed"}' \
2424 " https://api.github.com/repos/OneSignal/turbine/pulls/$PR_NUM "
@@ -48,7 +48,7 @@ git push --force origin "$BRANCH_NAME"
4848# Create pull request
4949PR_NUMBER=$(
5050 curl -sS -X POST \
51- -H " Authorization: Bearer $GH_TURBINE_TOKEN " \
51+ -H " Authorization: Bearer $GH_PUSH_TOKEN " \
5252 -H " Content-Type: application/json" \
5353 -d " {
5454 \" title\" : \" $RELEASE_MESSAGE \" ,
@@ -62,7 +62,7 @@ PR_NUMBER=$(
6262
6363# Request team reviewers
6464curl -sS -X POST \
65- -H " Authorization: Bearer $GH_TURBINE_TOKEN " \
65+ -H " Authorization: Bearer $GH_PUSH_TOKEN " \
6666 -H " Content-Type: application/json" \
6767 -d " {
6868 \" team_reviewers\" : [\" eng-sdk-platform\" ]
0 commit comments