From 0dd57a5e3b741da71b62d6251d99cf96e1324eda Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 10 Aug 2021 08:42:33 +0200 Subject: [PATCH] Use `getBooleanInput` (#101) Co-authored-by: CrazyMax --- dist/index.js | 8 ++++---- src/context.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index f91dadb..b5e8d9c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -44,10 +44,10 @@ function getInputs() { return { gpgPrivateKey: core.getInput('gpg-private-key', { required: true }), passphrase: core.getInput('passphrase'), - gitUserSigningkey: /true/i.test(core.getInput('git-user-signingkey')), - gitCommitGpgsign: /true/i.test(core.getInput('git-commit-gpgsign')), - gitTagGpgsign: /true/i.test(core.getInput('git-tag-gpgsign')), - gitPushGpgsign: /true/i.test(core.getInput('git-push-gpgsign')), + gitUserSigningkey: core.getBooleanInput('git-user-signingkey'), + gitCommitGpgsign: core.getBooleanInput('git-commit-gpgsign'), + gitTagGpgsign: core.getBooleanInput('git-tag-gpgsign'), + gitPushGpgsign: core.getBooleanInput('git-push-gpgsign'), gitCommitterName: core.getInput('git-committer-name'), gitCommitterEmail: core.getInput('git-committer-email'), workdir: core.getInput('workdir') || '.' diff --git a/src/context.ts b/src/context.ts index 8b80e1c..e309e34 100644 --- a/src/context.ts +++ b/src/context.ts @@ -17,10 +17,10 @@ export async function getInputs(): Promise { return { gpgPrivateKey: core.getInput('gpg-private-key', {required: true}), passphrase: core.getInput('passphrase'), - gitUserSigningkey: /true/i.test(core.getInput('git-user-signingkey')), - gitCommitGpgsign: /true/i.test(core.getInput('git-commit-gpgsign')), - gitTagGpgsign: /true/i.test(core.getInput('git-tag-gpgsign')), - gitPushGpgsign: /true/i.test(core.getInput('git-push-gpgsign')), + gitUserSigningkey: core.getBooleanInput('git-user-signingkey'), + gitCommitGpgsign: core.getBooleanInput('git-commit-gpgsign'), + gitTagGpgsign: core.getBooleanInput('git-tag-gpgsign'), + gitPushGpgsign: core.getBooleanInput('git-push-gpgsign'), gitCommitterName: core.getInput('git-committer-name'), gitCommitterEmail: core.getInput('git-committer-email'), workdir: core.getInput('workdir') || '.'