Buddy provides the
BUDDY_EXECUTION_BRANCH to determine to branch being build.
However when the build is triggered by a Pull Request (
BUDDY_EXECUTION_PULL_REQUEST_ID is set) the
BUDDY_EXECUTION_BRANCH is not set. So there is no way to determine the branch from which the PR originated nor the branch target by the PR.
Several other CI provide this information for example Travis with
Ideally, for builds triggered by a PR, Buddy should set
BUDDY_EXECUTION_BRANCH to the branch targeted by the PR (e.g.
BUDDY_EXECUTION_PULL_REQUEST_BRANCH to the branch from which the PR originated (e.g.