Closed sanmai closed 3 years ago
Also, I'm not entirely sure what do you meant in the issue:
It does not check for PR branch because it is not our call make this check. A CI might have this variable even if we don't know for certain if a build is a PR build. And it is a lot simpler this way.
I meant that we don't do checks for a PR build, assuming that if it is then we'll have an expected variable for a branch. In other words, we check if there's an expected variable, and return it.
and you can also sqash all together in one commit
It'll be far simpler for you to just squash-merge. WDYT?
I meant that we don't do checks for a PR build, assuming that if it is then we'll have an expected variable for a branch. In other words, we check if there's an expected variable, and return it.
This basically means target branch detection is intentionally independent on pull request detection, right? I'm not saying it should be, but generally speaking - if we can detect target branch, it means we should be able to tell this is PR build (but obviously not vice-versa). And from what I can see this is true in all cases in this PR - only Jenkins, TeamCity and Wercker does not support PR detection, and they does not support target branch detection as well. So yeah, that makes sense :)
Fixes #82
This is a BC break, hence it is time for a next major version.
Implementation status:
APPVEYOR_REPO_BRANCH
(ref)SYSTEM_PULLREQUEST_TARGETBRANCH
bamboo.repository.pr.targetBranch
(ref)BITBUCKET_PR_DESTINATION_BRANCH
BUDDY_EXECUTION_PULL_REQUEST_BASE_BRANCH
CF_PULL_REQUEST_TARGET
(CF is not yet supported here)DRONE_TARGET_BRANCH
GITHUB_BASE_REF
CI_MERGE_REQUEST_TARGET_BRANCH_NAME
orCI_EXTERNAL_PULL_REQUEST_TARGET_BRANCH_NAME
TRAVIS_BRANCH