File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,7 @@ getPRInfo() {
45
45
46
46
# Some CIs don't give us enough info, so we just get the PR number and ask the
47
47
# GH API for more info - "fork:branch". Some give us this directly.
48
- if [ -n " $BUILDKITE_BRANCH " ]; then
49
- # BuildKite
50
- head=$BUILDKITE_BRANCH
51
- elif [ -n " $PR_NUMBER " ]; then
48
+ if [ -n " $PR_NUMBER " ]; then
52
49
# GitHub
53
50
getPRInfo $PR_NUMBER
54
51
elif [ -n " $REVIEW_ID " ]; then
@@ -79,11 +76,14 @@ if [[ "$GITHUB_EVENT_NAME" == "merge_group" ]]; then
79
76
clone $deforg $defrepo ${withoutPrefix%%/ pr-* }
80
77
fi
81
78
82
- # Try the target branch of the push or PR.
83
- if [ -n " $GITHUB_BASE_REF " ]; then
84
- clone $deforg $defrepo $GITHUB_BASE_REF
85
- elif [ -n " $BUILDKITE_PULL_REQUEST_BASE_BRANCH " ]; then
86
- clone $deforg $defrepo $BUILDKITE_PULL_REQUEST_BASE_BRANCH
79
+ # Try the target branch of the push or PR, or the branch that was pushed to
80
+ # (ie. the 'master' branch should use matching 'master' dependencies)
81
+ base_or_branch=$GITHUB_BASE_REF
82
+ if [[ " $GITHUB_EVENT_NAME " == " push" ]]; then
83
+ base_or_branch=${GITHUB_REF}
84
+ fi
85
+ if [ -n " $base_or_branch " ]; then
86
+ clone $deforg $defrepo $base_or_branch
87
87
fi
88
88
89
89
# Try HEAD which is the branch name in Netlify (not BRANCH which is pull/xxxx/head for PR builds)
You can’t perform that action at this time.
0 commit comments