diff --git a/substrate/.maintain/gitlab/check_polkadot_companion_build.sh b/substrate/.maintain/gitlab/check_polkadot_companion_build.sh index a0850764495fd9ba9ff7686f154041a3d6312984..281fa8e1e8d4621a253fb4bdf0815a1859564dcb 100755 --- a/substrate/.maintain/gitlab/check_polkadot_companion_build.sh +++ b/substrate/.maintain/gitlab/check_polkadot_companion_build.sh @@ -12,7 +12,7 @@ github_api_substrate_pull_url="https://api.github.com/repos/paritytech/substrate/pulls" # use github api v3 in order to access the data without authentication -github_header="Accept: application/vnd.github.v3+json" +github_header="Authorization: token ${GITHUB_PR_TOKEN}" boldprint () { printf "|\n| \033[1m${@}\033[0m\n|\n" ; } boldcat () { printf "|\n"; while read l; do printf "| \033[1m${l}\033[0m\n"; done; printf "|\n" ; } diff --git a/substrate/.maintain/gitlab/check_polkadot_companion_status.sh b/substrate/.maintain/gitlab/check_polkadot_companion_status.sh index 5387e68f25cbba284433b8946f20f6eacfc76b9f..b781831055b6d500d133425fe7c0860a807938cb 100755 --- a/substrate/.maintain/gitlab/check_polkadot_companion_status.sh +++ b/substrate/.maintain/gitlab/check_polkadot_companion_status.sh @@ -7,7 +7,7 @@ github_api_substrate_pull_url="https://api.github.com/repos/paritytech/substrate/pulls" github_api_polkadot_pull_url="https://api.github.com/repos/paritytech/polkadot/pulls" # use github api v3 in order to access the data without authentication -github_header="Accept: application/vnd.github.v3+json" +github_header="Authorization: token ${GITHUB_PR_TOKEN}" boldprint () { printf "|\n| \033[1m${@}\033[0m\n|\n" ; } boldcat () { printf "|\n"; while read l; do printf "| \033[1m${l}\033[0m\n"; done; printf "|\n" ; } diff --git a/substrate/.maintain/gitlab/skip_if_draft.sh b/substrate/.maintain/gitlab/skip_if_draft.sh index a234a6c18e21c8e415c840f6bba1cf988d2a744c..cf6ea6a5b31155da9d6ac0c09079f4dffcec2dfa 100755 --- a/substrate/.maintain/gitlab/skip_if_draft.sh +++ b/substrate/.maintain/gitlab/skip_if_draft.sh @@ -2,7 +2,7 @@ url="https://api.github.com/repos/paritytech/substrate/pulls/${CI_COMMIT_REF_NAME}" echo "[+] API URL: $url" -draft_state=$(curl "$url" | jq -r .draft) +draft_state=$(curl -H "Authorization: token ${GITHUB_PR_TOKEN}" "$url" | jq -r .draft) echo "[+] Draft state: $draft_state" if [ "$draft_state" = 'true' ]; then