Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit 23d4836

Browse files
authored
Merge pull request #398 from codecov/error-on-prs
Only check merge errors on PRs
2 parents 5ad85e3 + b69ade3 commit 23d4836

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

SHA1SUM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4407b6151fd9a65b5e25ca9cfe026018f2d0a042 codecov
1+
b2d91c9a9e5e44495e7cb28bb01812024f007332 codecov

SHA256SUM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c8268e963fc51044d8508a7468671e7ea76288c93fb4a2b701c8a7748bcc725b codecov
1+
980c09cd11e443d3976fd5be6d5d58704bf4c702866974200c0bdb1a275110a2 codecov

SHA512SUM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
556ab0b5e63683a1083941282f43d9d7e08273385f750e19b5623047e95aa159564926f3a1de85addfe3af07bccb2f065d0eefad65b1b6ef7cec1a8921913e59 codecov
1+
a5d92fd71ae5c8ed558f995cc8788a8ea4395431809238591f525e4965f137676ca293caebf206f0a7f59b5690561e6b2642eaf9cba290a6777d51e9aa2d26f2 codecov

codecov

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -844,15 +844,16 @@ then
844844
if [ -n "$pr" ] && [ "$pr" != false ];
845845
then
846846
mc=$(git show --no-patch --format="%P" 2>/dev/null || echo "")
847-
fi
848-
if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]];
849-
then
850-
mc=$(echo "$mc" | cut -d' ' -f2)
851-
say " Fixing merge commit SHA $commit -> $mc"
852-
commit=$mc
853-
elif [[ "$mc" = "" ]];
854-
then
855-
say "$r-> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0$x"
847+
848+
if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]];
849+
then
850+
mc=$(echo "$mc" | cut -d' ' -f2)
851+
say " Fixing merge commit SHA $commit -> $mc"
852+
commit=$mc
853+
elif [[ "$mc" = "" ]];
854+
then
855+
say "$r-> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0$x"
856+
fi
856857
fi
857858

858859
elif [ "$SYSTEM_TEAMFOUNDATIONSERVERURI" != "" ];
@@ -880,12 +881,13 @@ then
880881
if [ -n "$pr" ] && [ "$pr" != false ];
881882
then
882883
mc=$(git show --no-patch --format="%P" 2>/dev/null || echo "")
883-
fi
884-
if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]];
885-
then
886-
mc=$(echo "$mc" | cut -d' ' -f2)
887-
say " Fixing merge commit SHA $commit -> $mc"
888-
commit=$mc
884+
885+
if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]];
886+
then
887+
mc=$(echo "$mc" | cut -d' ' -f2)
888+
say " Fixing merge commit SHA $commit -> $mc"
889+
commit=$mc
890+
fi
889891
fi
890892

891893
elif [ "$CI" = "true" ] && [ "$BITBUCKET_BUILD_NUMBER" != "" ];

0 commit comments

Comments
 (0)