From 3e64293bd43a44e2a1b4d2235b8d1d2bdddabd5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Fri, 26 Mar 2021 15:59:05 +0100 Subject: [PATCH] Fix companion check (#8464) --- .../gitlab/check_polkadot_companion_status.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/substrate/.maintain/gitlab/check_polkadot_companion_status.sh b/substrate/.maintain/gitlab/check_polkadot_companion_status.sh index bfd27e6347..e0412c7b7b 100755 --- a/substrate/.maintain/gitlab/check_polkadot_companion_status.sh +++ b/substrate/.maintain/gitlab/check_polkadot_companion_status.sh @@ -58,6 +58,12 @@ boldprint "companion pr: #${pr_companion}" # check the status of that pull request - needs to be # approved and mergable +curl -H "${github_header}" -sS -o companion_pr.json \ + ${github_api_polkadot_pull_url}/${pr_companion} + +pr_head_sha=$(jq -r -e '.head.sha' < companion_pr.json) +boldprint "Polkadot PR's HEAD SHA: $pr_head_sha" + curl -H "${github_header}" -sS -o companion_pr_reviews.json \ ${github_api_polkadot_pull_url}/${pr_companion}/reviews @@ -79,12 +85,6 @@ fi boldprint "polkadot pr #${pr_companion} state APPROVED" -curl -H "${github_header}" -sS -o companion_pr.json \ - ${github_api_polkadot_pull_url}/${pr_companion} - -pr_head_sha=$(jq -r -e '.head.sha' < companion_pr.json) -boldprint "Polkadot PR's HEAD SHA: $pr_head_sha" - if jq -e .merged < companion_pr.json >/dev/null then boldprint "polkadot pr #${pr_companion} already merged"