-
Notifications
You must be signed in to change notification settings - Fork 513
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix git repo initialization in presubmit (#822)
- Loading branch information
Showing
1 changed file
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/* | ||
|