Skip to content

Commit

Permalink
Fix git repo initialization in presubmit (#822)
Browse files Browse the repository at this point in the history
  • Loading branch information
medb authored Oct 20, 2020
1 parent bf87759 commit 4a29da5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cloudbuild/presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ configure_gcloud_ssh_key() {
# Fetches master branch from GitHub and "resets" local changes to be relative to it,
# so we can diff what changed relatively to master branch.
initialize_git_repo() {
rm -fr .git
git init

git config user.email "[email protected]"
git config user.name "ia-tests"

git remote add origin "https://github.com/GoogleCloudPlatform/dataproc-initialization-actions.git"
git remote add origin "https://github.com/GoogleCloudDataproc/initialization-actions.git"
git fetch origin master
# Fetch all PRs to get history for PRs created from forked repos
git fetch origin +refs/pull/*/merge:refs/remotes/origin/pr/*
Expand Down

0 comments on commit 4a29da5

Please sign in to comment.