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 #190 from blueyed/travis-pr-branch
Browse files Browse the repository at this point in the history
Travis: use $TRAVIS_PULL_REQUEST_BRANCH for branch if non-empty
  • Loading branch information
thomasrockhu authored Nov 10, 2020
2 parents 81372f2 + 4174009 commit 1ed543b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SHA1SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
25e47d940fbd29fc0f9acbfde3b447c152fd86dd codecov
ab0faeadb563e82c74d56e2fd5a4932bc8e7decb codecov
2 changes: 1 addition & 1 deletion SHA256SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
863cc21a5ffb7e9ff6d0a2a3b9eac0dca7a0c798e6d75be1f0e393a5788f9f70 codecov
c4835e9ba3b37fa8aacbabbea8be3c57291d6cf908e753dd5a44f2f53500681f codecov
2 changes: 1 addition & 1 deletion SHA512SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
26c53443a52a73f3926b22c2103450a372507baeb747cd1b175a9eb607b8b5427a85d6e71d28737e735a164b47218b4228c0c8f786f83c5e14485d05db94a2f0 codecov
549bcc09a0eac9942d31de62c6756d5d1027fd3fde3977032d75190e9c2009ddb7fa2d0ed05128e694c19d0b581280ef819dbd7ba3830a7ee5f7db47fb6703f9 codecov
2 changes: 1 addition & 1 deletion codecov
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ then
tag="$TRAVIS_TAG"
if [ "$TRAVIS_BRANCH" != "$TRAVIS_TAG" ];
then
branch="$TRAVIS_BRANCH"
branch="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}"
fi

language=$(compgen -A variable | grep "^TRAVIS_.*_VERSION$" | head -1)
Expand Down
5 changes: 5 additions & 0 deletions tests/test
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,11 @@ function test_travis () {
export TRAVIS_PULL_REQUEST="false"
export TRAVIS_JOB_NUMBER="4.1"
assertURL "https://codecov.io/upload/v4?package=bash-$VERSION&token=&branch=master&commit=$TEST_DATA_GIT_COMMIT&build=4.1&build_url=&name=&tag=&slug=codecov%2Fci-repo&service=travis&flags=&pr=false&job=33116958&cmd_args=d,C"

# Uses original branch name (not the target branch).
export TRAVIS_PULL_REQUEST_BRANCH=frompr
export TRAVIS_PULL_REQUEST="12345"
assertURL "https://codecov.io/upload/v4?package=bash-$VERSION&token=&branch=frompr&commit=$TEST_DATA_GIT_COMMIT&build=4.1&build_url=&name=&tag=&slug=codecov%2Fci-repo&service=travis&flags=&pr=12345&job=33116958&cmd_args=d,C"
}

function test_jenkins (){
Expand Down

0 comments on commit 1ed543b

Please sign in to comment.