Skip to content
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

[DRAFT] Dougw checkout pchila forked branch #6546

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .buildkite/hooks/post-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,25 @@ pull_request="${BUILDKITE_PULL_REQUEST:-false}"

if [[ "${pull_request}" == "false" ]]; then
echo "Not a pull request, skipping"

USE_FORKED_REPO="${FORKED_REPO:-}"
USE_FORKED_BRANCH="${FORKED_BRANCH:-}"

echo "Forked repo: ${USE_FORKED_REPO}"
echo "Forked branch: ${USE_FORKED_BRANCH}"
if [ -n "${USE_FORKED_REPO}" ]; then
echo "Insided forked repo if"
if [ -n "${USE_FORKED_BRANCH}" ]; then
echo "Inside forked branch if"
# checkout
echo "Checking out branch ${USE_FORKED_BRANCH} from github repo ${USE_FORKED_REPO}"
git remote add forked "git@github.com:${USE_FORKED_REPO}"
git fetch forked
git checkout "${USE_FORKED_BRANCH}"
fi
fi
echo "After forked repo/branch statements"

exit 0
fi

Expand Down
Loading