.github/workflows: compare PR branch to master
Since 4410de52c1 we fetch all origin branches, and FETCH_HEAD can point
elsewhere
This commit is contained in:
committed by
classabbyamp
parent
c051a0d189
commit
f5a960da8f
@@ -10,7 +10,7 @@ case "$tip" in
|
|||||||
*) tip="${tip%% *}" ;;
|
*) tip="${tip%% *}" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
base="$(git merge-base FETCH_HEAD "$tip")"
|
base="$(git merge-base origin/HEAD "$tip")"
|
||||||
|
|
||||||
[ $(git rev-list --count "$tip" "^$base") -lt 200 ] || {
|
[ $(git rev-list --count "$tip" "^$base") -lt 200 ] || {
|
||||||
echo "::error title=Branch out of date::Your branch is too out of date. Please rebase on upstream and force-push."
|
echo "::error title=Branch out of date::Your branch is too out of date. Please rebase on upstream and force-push."
|
||||||
|
|||||||
Reference in New Issue
Block a user