From 2eae17b50b3bb54f038b45dcb8f04d53831369f0 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 19 Jan 2023 14:06:59 -0800 Subject: [PATCH] Use credentials when checking GitHub --- ci/scripts/detect-ubuntu-image-updates.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/scripts/detect-ubuntu-image-updates.sh b/ci/scripts/detect-ubuntu-image-updates.sh index 6f0d85cb67..cbdfc062df 100755 --- a/ci/scripts/detect-ubuntu-image-updates.sh +++ b/ci/scripts/detect-ubuntu-image-updates.sh @@ -11,8 +11,8 @@ if [[ $current = $latest ]]; then exit 0; fi -milestone_number=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones\?state\=open | jq -c --arg MILESTONE "$MILESTONE" '.[] | select(.title==$MILESTONE)' | jq -r '.number') -existing_tasks=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-builds\&milestone\=${milestone_number} ) +milestone_number=$( curl -u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones\?state\=open | jq -c --arg MILESTONE "$MILESTONE" '.[] | select(.title==$MILESTONE)' | jq -r '.number') +existing_tasks=$( curl -u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-builds\&milestone\=${milestone_number} ) existing_upgrade_issues=$( echo "$existing_tasks" | jq -c --arg TITLE "$ISSUE_TITLE" '.[] | select(.title==$TITLE)' ) if [[ ${existing_upgrade_issues} = "" ]]; then