From 6edf849b58af0995c25082b3f16ecf39d063fbdd Mon Sep 17 00:00:00 2001 From: Kengo TODA Date: Thu, 19 Aug 2021 10:49:41 +0800 Subject: [PATCH] style: put the name of input to the constants.ts --- src/constants.ts | 1 + src/util.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/constants.ts b/src/constants.ts index acae4c8a..94d7667f 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -17,5 +17,6 @@ export const INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined; export const INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE'; export const INPUT_CACHE = 'cache'; +export const INPUT_JOB_STATUS = 'job-status'; export const STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint'; diff --git a/src/util.ts b/src/util.ts index 89beca06..588b3624 100644 --- a/src/util.ts +++ b/src/util.ts @@ -5,6 +5,8 @@ import * as semver from 'semver'; import * as core from '@actions/core'; import * as tc from '@actions/tool-cache'; +import { INPUT_JOB_STATUS } from './constants'; + export function getTempDir() { let tempDirectory = process.env['RUNNER_TEMP'] || os.tmpdir(); @@ -71,7 +73,7 @@ export function getToolcachePath(toolName: string, version: string, architecture } export function isJobStatusSuccess() { - const jobStatus = core.getInput('job-status'); + const jobStatus = core.getInput(INPUT_JOB_STATUS); return jobStatus === 'success'; }