From eb135ccb56f7b7fc570949b1ac73ab6e38547a28 Mon Sep 17 00:00:00 2001 From: gabriel klawitter Date: Thu, 26 Mar 2020 16:57:55 +0530 Subject: [PATCH] ci: check_polkadot: accept linking to polkadot pr (#5410) --- substrate/.maintain/gitlab/check_polkadot.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/substrate/.maintain/gitlab/check_polkadot.sh b/substrate/.maintain/gitlab/check_polkadot.sh index 6087d86cde..1d5bba98af 100755 --- a/substrate/.maintain/gitlab/check_polkadot.sh +++ b/substrate/.maintain/gitlab/check_polkadot.sh @@ -50,7 +50,10 @@ then boldprint "this is pull request no ${CI_COMMIT_REF_NAME}" # get the last reference to a pr in polkadot comppr="$(curl -H "${github_header}" -s ${github_api_substrate_pull_url}/${CI_COMMIT_REF_NAME} \ - | sed -n -r 's;^[[:space:]]+"body":[[:space:]]+".*polkadot companion: paritytech/polkadot#([0-9]+).*"[^"]+$;\1;p;$!d')" + | sed -n -r \ + -e 's;^[[:space:]]+"body":[[:space:]]+".*polkadot companion: paritytech/polkadot#([0-9]+).*"[^"]+$;\1;p' \ + -e 's;^[[:space:]]+"body":[[:space:]]+".*polkadot companion: https://github.com/paritytech/polkadot/pull/([0-9]+).*"[^"]+$;\1;p' \ + | tail -n 1)" if [ "${comppr}" ] then boldprint "companion pr specified: #${comppr}"