From 6727ffe63cf10549e07f2c3551dbb350cc789141 Mon Sep 17 00:00:00 2001 From: James Ives Date: Wed, 17 Apr 2024 05:18:18 -0400 Subject: [PATCH] chore: resolve formatting changes from newer prettier version --- integration/index.html | 2 +- src/constants.ts | 34 +++++++++++++++++----------------- src/util.ts | 8 ++++---- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/integration/index.html b/integration/index.html index d427f0c96..48f62593d 100644 --- a/integration/index.html +++ b/integration/index.html @@ -1,4 +1,4 @@ - + diff --git a/src/constants.ts b/src/constants.ts index 51bbb5e41..1d3298468 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -106,26 +106,26 @@ export const action: ActionInterface = { email: !isNullOrUndefined(getInput('git-config-email')) ? getInput('git-config-email') : pusher && pusher.email - ? pusher.email - : `${ - process.env.GITHUB_ACTOR || 'github-pages-deploy-action' - }@users.noreply.${ - process.env.GITHUB_SERVER_URL - ? stripProtocolFromUrl(process.env.GITHUB_SERVER_URL) - : 'github.com' - }`, + ? pusher.email + : `${ + process.env.GITHUB_ACTOR || 'github-pages-deploy-action' + }@users.noreply.${ + process.env.GITHUB_SERVER_URL + ? stripProtocolFromUrl(process.env.GITHUB_SERVER_URL) + : 'github.com' + }`, name: !isNullOrUndefined(getInput('git-config-name')) ? getInput('git-config-name') : pusher && pusher.name - ? pusher.name - : process.env.GITHUB_ACTOR - ? process.env.GITHUB_ACTOR - : 'GitHub Pages Deploy Action', + ? pusher.name + : process.env.GITHUB_ACTOR + ? process.env.GITHUB_ACTOR + : 'GitHub Pages Deploy Action', repositoryName: !isNullOrUndefined(getInput('repository-name')) ? getInput('repository-name') : repository && repository.full_name - ? repository.full_name - : process.env.GITHUB_REPOSITORY, + ? repository.full_name + : process.env.GITHUB_REPOSITORY, token: getInput('token'), singleCommit: !isNullOrUndefined(getInput('single-commit')) ? getInput('single-commit').toLowerCase() === 'true' @@ -136,9 +136,9 @@ export const action: ActionInterface = { sshKey: isNullOrUndefined(getInput('ssh-key')) ? false : !isNullOrUndefined(getInput('ssh-key')) && - getInput('ssh-key').toLowerCase() === 'true' - ? true - : getInput('ssh-key'), + getInput('ssh-key').toLowerCase() === 'true' + ? true + : getInput('ssh-key'), targetFolder: getInput('target-folder'), workspace: process.env.GITHUB_WORKSPACE || '', tag: getInput('tag') diff --git a/src/util.ts b/src/util.ts index a5a6a7ff8..7ed60760a 100644 --- a/src/util.ts +++ b/src/util.ts @@ -47,8 +47,8 @@ export const generateFolderPath = (action: ActionInterface): string => { return path.isAbsolute(folderName) ? folderName : folderName.startsWith('~') - ? folderName.replace('~', process.env.HOME as string) - : path.join(action.workspace, folderName) + ? folderName.replace('~', process.env.HOME as string) + : path.join(action.workspace, folderName) } /** @@ -132,8 +132,8 @@ export const extractErrorMessage = (error: unknown): string => error instanceof Error ? error.message : typeof error == 'string' - ? error - : JSON.stringify(error) + ? error + : JSON.stringify(error) /** * Strips the protocol from a provided URL.