Skip to content

Commit

Permalink
[ci] make spec-check use git token
Browse files Browse the repository at this point in the history
prevents throttling
  • Loading branch information
dennisjbell committed Mar 13, 2022
1 parent b55d82e commit 8293833
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ci/scripts/compare-release-specs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ if [[ "${#changed[@]}" -gt 0 && -n "${changed[0]}" ]] ; then
reponame=$(echo "${repo}" | grep github | cut -d "/" -f4-5)
set -e
if [[ -n ${reponame} ]]; then
branch=$(curl --silent -L -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${reponame}" | jq -r .default_branch)
cmd=( curl --silent -L -H "Accept: application/vnd.github.v3+json" )
[[ -n "$GITHUB_AUTH_TOKEN" ]] && cmd+=( -H "Authorization: token $GITHUB_AUTH_TOKEN" )
cmd+=( "https://api.github.com/repos/${reponame}" )
branch=$( "${cmd[@]}" | jq -r .default_branch)
else
branch="master"
fi
Expand Down
1 change: 1 addition & 0 deletions ci/tasks/spec-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ outputs:

params:
GENESIS_HONOR_ENV: 1
GITHUB_AUTH_TOKEN: ((github.access_token))

run:
path: git-ci/ci/scripts/spec-check

0 comments on commit 8293833

Please sign in to comment.