From 68960cdd4c856524e1bc7b04ed76499caf956169 Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Fri, 25 Sep 2020 14:41:18 +0900 Subject: [PATCH] style: move input defaults together --- dist/index.js | 6 +++--- src/input-helper.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index ccdf443..6783d46 100644 --- a/dist/index.js +++ b/dist/index.js @@ -130,9 +130,6 @@ function getInputs() { if (!inputs.repository && process.env['DOCKER_REPOSITORY']) { inputs.repository = process.env['DOCKER_REPOSITORY']; } - if (!inputs.repository && process.env['GITHUB_REPOSITORY']) { - inputs.repository = process.env['GITHUB_REPOSITORY']; - } if (!inputs.readmeFilepath && process.env['README_FILEPATH']) { inputs.readmeFilepath = process.env['README_FILEPATH']; } @@ -140,6 +137,9 @@ function getInputs() { if (!inputs.readmeFilepath) { inputs.readmeFilepath = README_FILEPATH_DEFAULT; } + if (!inputs.repository && process.env['GITHUB_REPOSITORY']) { + inputs.repository = process.env['GITHUB_REPOSITORY']; + } return inputs; } exports.getInputs = getInputs; diff --git a/src/input-helper.ts b/src/input-helper.ts index b8dafc0..085f1c6 100644 --- a/src/input-helper.ts +++ b/src/input-helper.ts @@ -39,9 +39,6 @@ export function getInputs(): Inputs { if (!inputs.repository && process.env['DOCKER_REPOSITORY']) { inputs.repository = process.env['DOCKER_REPOSITORY'] } - if (!inputs.repository && process.env['GITHUB_REPOSITORY']) { - inputs.repository = process.env['GITHUB_REPOSITORY'] - } if (!inputs.readmeFilepath && process.env['README_FILEPATH']) { inputs.readmeFilepath = process.env['README_FILEPATH'] @@ -51,6 +48,9 @@ export function getInputs(): Inputs { if (!inputs.readmeFilepath) { inputs.readmeFilepath = README_FILEPATH_DEFAULT } + if (!inputs.repository && process.env['GITHUB_REPOSITORY']) { + inputs.repository = process.env['GITHUB_REPOSITORY'] + } return inputs }