From 119d340e2258367e135e1ee9f1388f6e797dc959 Mon Sep 17 00:00:00 2001 From: James Ives Date: Mon, 25 Apr 2022 21:59:43 -0400 Subject: [PATCH] Formatting --- .github/workflows/integration.yml | 2 +- src/constants.ts | 5 +++-- src/ssh.ts | 9 +++------ src/util.ts | 6 +++--- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 681bc837..95d6e094 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -223,7 +223,7 @@ jobs: integration-container, integration-ssh, integration-ssh-third-party-client, - integration-env, + integration-env ] runs-on: ubuntu-latest steps: diff --git a/src/constants.ts b/src/constants.ts index 80d98e63..6505b778 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -105,8 +105,9 @@ export const action: ActionInterface = { ? getInput('git-config-email') : pusher && pusher.email ? pusher.email - : `${process.env.GITHUB_ACTOR || - 'github-pages-deploy-action'}@users.noreply.${ + : `${ + process.env.GITHUB_ACTOR || 'github-pages-deploy-action' + }@users.noreply.${ process.env.GITHUB_SERVER_URL ? stripProtocolFromUrl(process.env.GITHUB_SERVER_URL) : 'github.com' diff --git a/src/ssh.ts b/src/ssh.ts index 35985742..1c903920 100644 --- a/src/ssh.ts +++ b/src/ssh.ts @@ -23,14 +23,11 @@ export async function configureSSH(action: ActionInterface): Promise { appendFileSync(sshKnownHostsDirectory, sshGitHubKnownHostDss) // Initializes SSH agent. - const agentOutput = execFileSync('ssh-agent') - .toString() - .split('\n') + const agentOutput = execFileSync('ssh-agent').toString().split('\n') agentOutput.map(line => { - const exportableVariables = /^(SSH_AUTH_SOCK|SSH_AGENT_PID)=(.*); export \1/.exec( - line - ) + const exportableVariables = + /^(SSH_AUTH_SOCK|SSH_AGENT_PID)=(.*); export \1/.exec(line) if (exportableVariables && exportableVariables.length) { exportVariable(exportableVariables[1], exportableVariables[2]) diff --git a/src/util.ts b/src/util.ts index 600b2620..59f7d982 100644 --- a/src/util.ts +++ b/src/util.ts @@ -96,9 +96,9 @@ export const suppressSensitiveInformation = ( return value } - const orderedByLength = ([action.token, action.repositoryPath].filter( - Boolean - ) as string[]).sort((a, b) => b.length - a.length) + const orderedByLength = ( + [action.token, action.repositoryPath].filter(Boolean) as string[] + ).sort((a, b) => b.length - a.length) for (const find of orderedByLength) { value = replaceAll(value, find, '***')