Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix check polkadot companion status check
  • Loading branch information
gabreal committed Jul 20, 2020
commit f672fb15e66e09562fc635eb6e89ecd100853c2a
4 changes: 3 additions & 1 deletion .maintain/gitlab/check_polkadot_companion_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ curl -H "${github_header}" -sS -o companion_pr_reviews.json \
${github_api_polkadot_pull_url}/${pr_companion}/reviews

# If there are any 'CHANGES_REQUESTED' reviews for the *current* review
jq -r -e '.[] | select(.state == "CHANGES_REQUESTED").commit_id' \
< companion_pr_reviews.json > companion_pr_reviews_current.json
while IFS= read -r line; do
if [ "$line" = "$pr_head_sha" ]; then
boldprint "polkadot pr #${pr_companion} has CHANGES_REQUESTED for the latest commit"
exit 1
fi
done <<< $(jq -r -e '.[] | select(.state == "CHANGES_REQUESTED").commit_id' < companion_pr_reviews.json)
done < companion_pr_reviews_current.json

# Then we check for at least 1 APPROVED
if [ -z "$(jq -r -e '.[].state | select(. == "APPROVED")' < companion_pr_reviews.json)" ]; then
Expand Down