-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Make fetchdep check out matching branch name #29601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,10 +45,7 @@ getPRInfo() { | |
|
||
# Some CIs don't give us enough info, so we just get the PR number and ask the | ||
# GH API for more info - "fork:branch". Some give us this directly. | ||
if [ -n "$BUILDKITE_BRANCH" ]; then | ||
# BuildKite | ||
head=$BUILDKITE_BRANCH | ||
elif [ -n "$PR_NUMBER" ]; then | ||
if [ -n "$PR_NUMBER" ]; then | ||
# GitHub | ||
getPRInfo $PR_NUMBER | ||
elif [ -n "$REVIEW_ID" ]; then | ||
|
@@ -79,11 +76,14 @@ if [[ "$GITHUB_EVENT_NAME" == "merge_group" ]]; then | |
clone $deforg $defrepo ${withoutPrefix%%/pr-*} | ||
fi | ||
|
||
# Try the target branch of the push or PR. | ||
if [ -n "$GITHUB_BASE_REF" ]; then | ||
clone $deforg $defrepo $GITHUB_BASE_REF | ||
elif [ -n "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" ]; then | ||
clone $deforg $defrepo $BUILDKITE_PULL_REQUEST_BASE_BRANCH | ||
# Try the target branch of the push or PR, or the branch that was pushed to | ||
# (ie. the 'master' branch should use matching 'master' dependencies) | ||
base_or_branch=$GITHUB_BASE_REF | ||
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then | ||
base_or_branch=${GITHUB_REF} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isn't this what the block above is trying to do with TRY_BRANCH? This implies There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like $head is only set by |
||
fi | ||
if [ -n "$base_or_branch" ]; then | ||
clone $deforg $defrepo $base_or_branch | ||
fi | ||
|
||
# Try HEAD which is the branch name in Netlify (not BRANCH which is pull/xxxx/head for PR builds) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're dropping buildkite support here can we also drop it elsewhere, e.g. L48-L50
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, grep says that's everything.