From 287da9b78e48fb805a542407902f06bf62b314cb Mon Sep 17 00:00:00 2001 From: Milad Irannejad Date: Wed, 1 Mar 2023 17:50:51 -0500 Subject: [PATCH] Fix linting and formatting issues --- src/git-auth-helper.ts | 9 +++++++-- src/git-command-manager.ts | 11 +++++++---- src/git-source-provider.ts | 7 ++++++- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/git-auth-helper.ts b/src/git-auth-helper.ts index 6dbec52..a5080e4 100644 --- a/src/git-auth-helper.ts +++ b/src/git-auth-helper.ts @@ -136,7 +136,12 @@ class GitAuthHelper { await this.git.tryConfigUnset(this.insteadOfKey, ConfigScope.System) if (!this.settings.sshKey) { for (const insteadOfValue of this.insteadOfValues) { - await this.git.config(this.insteadOfKey, insteadOfValue, ConfigScope.System, true) + await this.git.config( + this.insteadOfKey, + insteadOfValue, + ConfigScope.System, + true + ) } } } catch (err) { @@ -294,7 +299,7 @@ class GitAuthHelper { await this.git.config( this.tokenConfigKey, this.tokenPlaceholderConfigValue, - configScope, + configScope ) // Replace the placeholder diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index eb80485..441b921 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -13,9 +13,9 @@ import {GitVersion} from './git-version' export const MinimumGitVersion = new GitVersion('2.18') export enum ConfigScope { - Local = "local", - Global = "global", - System = "system", + Local = 'local', + Global = 'global', + System = 'system' } export interface IGitCommandManager { @@ -181,7 +181,10 @@ class GitCommandManager { configScope?: ConfigScope, add?: boolean ): Promise { - const args: string[] = ['config', configScope ? `--${configScope}` : '--local'] + const args: string[] = [ + 'config', + configScope ? `--${configScope}` : '--local' + ] if (add) { args.push('--add') } diff --git a/src/git-source-provider.ts b/src/git-source-provider.ts index cbec039..fcb74ca 100644 --- a/src/git-source-provider.ts +++ b/src/git-source-provider.ts @@ -50,7 +50,12 @@ export async function getSource(settings: IGitSourceSettings): Promise { ) await git - .config('safe.directory', settings.repositoryPath, ConfigScope.System, true) + .config( + 'safe.directory', + settings.repositoryPath, + ConfigScope.System, + true + ) .catch(error => { core.info( `Failed to initialize safe directory with error: ${error}`