Skip to content

Commit 82e0410

Browse files
committed
Buildkite: Try same-named branches when cloning core repos, for PRs originating from official dlang repos
1 parent d2c3c88 commit 82e0410

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

buildkite/origin_target_branch.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ fi
1010
if [ $# -eq 2 ]; then
1111
origin_target_branch="$2"
1212
else
13-
origin_target_branch="${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-$BUILDKITE_BRANCH}"
13+
if [[ "${BUILDKITE_PULL_REQUEST_REPO:-}" =~ github\.com/dlang/ ]]; then
14+
# PR from official dlang repo - try same-named branches for the other repos
15+
origin_target_branch="$BUILDKITE_BRANCH"
16+
else
17+
origin_target_branch="${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-$BUILDKITE_BRANCH}"
18+
fi
1419
fi
1520

1621
if [ "$origin_target_branch" == "master" ] || [ "$origin_target_branch" == "stable" ] ; then

0 commit comments

Comments
 (0)