From 8fbd812be97055e601cd7741c9f8101f6b8f5738 Mon Sep 17 00:00:00 2001 From: Alvin Huang <17609145+alvin-huang@users.noreply.github.com> Date: Wed, 11 Mar 2020 13:25:15 -0400 Subject: [PATCH] add Authorization header in GitHub API call (#7436) --- .circleci/scripts/cherry-picker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/scripts/cherry-picker.sh b/.circleci/scripts/cherry-picker.sh index 819a8a5427..3ff1626999 100755 --- a/.circleci/scripts/cherry-picker.sh +++ b/.circleci/scripts/cherry-picker.sh @@ -64,7 +64,7 @@ function cherry_pick_with_slack_notification { } # search for the PR labels applicable to the specified commit -resp=$(curl -f -s "https://api.github.com/search/issues?q=repo:$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME+sha:$CIRCLE_SHA1") +resp=$(curl -f -s -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/search/issues?q=repo:$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME+sha:$CIRCLE_SHA1") ret="$?" if [[ "$ret" -ne 0 ]]; then status "The GitHub API returned $ret which means it was probably rate limited."