ci: fix merge on polkadot companion job (#6020)

This commit is contained in:
André Silva
2020-05-14 00:01:57 +01:00
committed by GitHub
parent d34a0f4e22
commit a975796d76
@@ -83,12 +83,12 @@ then
if [ "${pr_companion}" ] if [ "${pr_companion}" ]
then then
boldprint "companion pr specified/detected: #${pr_companion}" boldprint "companion pr specified/detected: #${pr_companion}"
git fetch --depth 1 origin refs/pull/${pr_companion}/head:pr/${pr_companion} git fetch origin refs/pull/${pr_companion}/head:pr/${pr_companion}
git checkout pr/${pr_companion} git checkout pr/${pr_companion}
git merge origin/master git merge origin/master
else else
pr_ref="$(grep -Po '"ref"\s*:\s*"\K(?!master)[^"]*' "${pr_data_file}")" pr_ref="$(grep -Po '"ref"\s*:\s*"\K(?!master)[^"]*' "${pr_data_file}")"
if git fetch --depth 1 origin "$pr_ref":branch/"$pr_ref" 2>/dev/null if git fetch origin "$pr_ref":branch/"$pr_ref" 2>/dev/null
then then
boldprint "companion branch detected: $pr_ref" boldprint "companion branch detected: $pr_ref"
git checkout branch/"$pr_ref" git checkout branch/"$pr_ref"