refactor(dev-infra): move GitClient to common util (#37318)

Moves GitClient from merge script into common utils for unified
method of performing git actions throughout the ng-dev toolset.

PR Close #37318
This commit is contained in:
Joey Perrott
2020-05-27 15:39:31 -07:00
committed by atscott
parent 818d93d7e9
commit 85b6c94cc6
12 changed files with 209 additions and 214 deletions

View File

@ -6,9 +6,10 @@
* found in the LICENSE file at https://angular.io/license
*/
import {GitClient, GitCommandError} from '../../utils/git';
import {MergeConfigWithRemote} from './config';
import {PullRequestFailure} from './failures';
import {GitClient, GitCommandError} from './git';
import {isPullRequest, loadAndValidatePullRequest,} from './pull-request';
import {GithubApiMergeStrategy} from './strategies/api-merge';
import {AutosquashMergeStrategy} from './strategies/autosquash-merge';
@ -40,7 +41,7 @@ export interface MergeResult {
*/
export class PullRequestMergeTask {
/** Git client that can be used to execute Git commands. */
git = new GitClient(this.projectRoot, this._githubToken, this.config);
git = new GitClient(this._githubToken, {github: this.config.remote});
constructor(
public projectRoot: string, public config: MergeConfigWithRemote,