diff --git a/cloudbuild-task-contracts/src/Inputs.ts b/cloudbuild-task-contracts/src/Inputs.ts index ba96d4e..a72e688 100644 --- a/cloudbuild-task-contracts/src/Inputs.ts +++ b/cloudbuild-task-contracts/src/Inputs.ts @@ -13,5 +13,8 @@ export abstract class Inputs { * @param required A value indicating whether an explicit value for this input is required. * @returns A boolean value. */ - abstract getBoolInput(name: string, required?: boolean): boolean | undefined; + getBoolInput(name: string, required?: boolean): boolean | undefined { + const value = this.getInput(name, required); + return value === undefined ? undefined : value.toLowerCase() === "true"; + } } diff --git a/cloudbuild-task-github-actions/src/Inputs.ts b/cloudbuild-task-github-actions/src/Inputs.ts index 14a4920..66c3e4d 100644 --- a/cloudbuild-task-github-actions/src/Inputs.ts +++ b/cloudbuild-task-github-actions/src/Inputs.ts @@ -1,13 +1,8 @@ import * as contracts from 'cloudbuild-task-contracts'; import * as core from '@actions/core'; -export class Inputs implements contracts.Inputs { +export class Inputs extends contracts.Inputs { getInput(name: string, required?: boolean): string | undefined { return core.getInput(name, { required: required }); } - - getBoolInput(name: string, required?: boolean): boolean | undefined { - const value = this.getInput(name, required); - return value === undefined ? undefined : value.toLowerCase() === "true"; - } }