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

Commit

Permalink
Merge pull request #398 from codecov/error-on-prs
Browse files Browse the repository at this point in the history
Only check merge errors on PRs
  • Loading branch information
thomasrockhu authored Dec 28, 2020
2 parents 5ad85e3 + b69ade3 commit 23d4836
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion SHA1SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4407b6151fd9a65b5e25ca9cfe026018f2d0a042 codecov
b2d91c9a9e5e44495e7cb28bb01812024f007332 codecov
2 changes: 1 addition & 1 deletion SHA256SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c8268e963fc51044d8508a7468671e7ea76288c93fb4a2b701c8a7748bcc725b codecov
980c09cd11e443d3976fd5be6d5d58704bf4c702866974200c0bdb1a275110a2 codecov
2 changes: 1 addition & 1 deletion SHA512SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
556ab0b5e63683a1083941282f43d9d7e08273385f750e19b5623047e95aa159564926f3a1de85addfe3af07bccb2f065d0eefad65b1b6ef7cec1a8921913e59 codecov
a5d92fd71ae5c8ed558f995cc8788a8ea4395431809238591f525e4965f137676ca293caebf206f0a7f59b5690561e6b2642eaf9cba290a6777d51e9aa2d26f2 codecov
32 changes: 17 additions & 15 deletions codecov
Original file line number Diff line number Diff line change
Expand Up @@ -844,15 +844,16 @@ then
if [ -n "$pr" ] && [ "$pr" != false ];
then
mc=$(git show --no-patch --format="%P" 2>/dev/null || echo "")
fi
if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]];
then
mc=$(echo "$mc" | cut -d' ' -f2)
say " Fixing merge commit SHA $commit -> $mc"
commit=$mc
elif [[ "$mc" = "" ]];
then
say "$r-> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0$x"

if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]];
then
mc=$(echo "$mc" | cut -d' ' -f2)
say " Fixing merge commit SHA $commit -> $mc"
commit=$mc
elif [[ "$mc" = "" ]];
then
say "$r-> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0$x"
fi
fi

elif [ "$SYSTEM_TEAMFOUNDATIONSERVERURI" != "" ];
Expand Down Expand Up @@ -880,12 +881,13 @@ then
if [ -n "$pr" ] && [ "$pr" != false ];
then
mc=$(git show --no-patch --format="%P" 2>/dev/null || echo "")
fi
if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]];
then
mc=$(echo "$mc" | cut -d' ' -f2)
say " Fixing merge commit SHA $commit -> $mc"
commit=$mc

if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]];
then
mc=$(echo "$mc" | cut -d' ' -f2)
say " Fixing merge commit SHA $commit -> $mc"
commit=$mc
fi
fi

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

0 comments on commit 23d4836

Please sign in to comment.