Loading __tests__/actionUtils.test.ts +7 −2 Changes for __tests__/actionUtils.test.ts: 7 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ beforeAll(() => { afterEach(() => { delete process.env[Events.Key]; delete process.env[RefKey]; testUtils.clearInputs(); }); test("isGhes returns true if server url is not github.com", () => { Loading Loading @@ -215,7 +214,7 @@ test("getInputAsArray handles empty lines correctly", () => { }); test("getInputAsInt returns undefined if input not set", () => { expect(actionUtils.getInputAsInt("foo")).toBeUndefined(); expect(actionUtils.getInputAsInt("undefined")).toBeUndefined(); }); test("getInputAsInt returns value if input is valid", () => { Loading @@ -227,3 +226,9 @@ test("getInputAsInt returns undefined if input is invalid or NaN", () => { testUtils.setInput("foo", "bar"); expect(actionUtils.getInputAsInt("foo")).toBeUndefined(); }); test("getInputAsInt throws if required and value missing", () => { expect(() => actionUtils.getInputAsInt("undefined", { required: true }) ).toThrowError(); }); dist/restore/index.js +2 −2 Changes for dist/restore/index.js: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -31354,8 +31354,8 @@ function getInputAsArray(name, options) { } exports.getInputAsArray = getInputAsArray; function getInputAsInt(name, options) { const value = Number(core.getInput(name, options)); if (Number.isNaN(value) || value < 0) { const value = parseInt(core.getInput(name, options)); if (isNaN(value) || value < 0) { return undefined; } return value; dist/save/index.js +2 −2 Changes for dist/save/index.js: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -31354,8 +31354,8 @@ function getInputAsArray(name, options) { } exports.getInputAsArray = getInputAsArray; function getInputAsInt(name, options) { const value = Number(core.getInput(name, options)); if (Number.isNaN(value) || value < 0) { const value = parseInt(core.getInput(name, options)); if (isNaN(value) || value < 0) { return undefined; } return value; src/utils/actionUtils.ts +2 −2 Changes for src/utils/actionUtils.ts: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -68,8 +68,8 @@ export function getInputAsInt( name: string, options?: core.InputOptions ): number | undefined { const value = Number(core.getInput(name, options)); if (Number.isNaN(value) || value < 0) { const value = parseInt(core.getInput(name, options)); if (isNaN(value) || value < 0) { return undefined; } return value; Loading Loading
__tests__/actionUtils.test.ts +7 −2 Changes for __tests__/actionUtils.test.ts: 7 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ beforeAll(() => { afterEach(() => { delete process.env[Events.Key]; delete process.env[RefKey]; testUtils.clearInputs(); }); test("isGhes returns true if server url is not github.com", () => { Loading Loading @@ -215,7 +214,7 @@ test("getInputAsArray handles empty lines correctly", () => { }); test("getInputAsInt returns undefined if input not set", () => { expect(actionUtils.getInputAsInt("foo")).toBeUndefined(); expect(actionUtils.getInputAsInt("undefined")).toBeUndefined(); }); test("getInputAsInt returns value if input is valid", () => { Loading @@ -227,3 +226,9 @@ test("getInputAsInt returns undefined if input is invalid or NaN", () => { testUtils.setInput("foo", "bar"); expect(actionUtils.getInputAsInt("foo")).toBeUndefined(); }); test("getInputAsInt throws if required and value missing", () => { expect(() => actionUtils.getInputAsInt("undefined", { required: true }) ).toThrowError(); });
dist/restore/index.js +2 −2 Changes for dist/restore/index.js: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -31354,8 +31354,8 @@ function getInputAsArray(name, options) { } exports.getInputAsArray = getInputAsArray; function getInputAsInt(name, options) { const value = Number(core.getInput(name, options)); if (Number.isNaN(value) || value < 0) { const value = parseInt(core.getInput(name, options)); if (isNaN(value) || value < 0) { return undefined; } return value;
dist/save/index.js +2 −2 Changes for dist/save/index.js: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -31354,8 +31354,8 @@ function getInputAsArray(name, options) { } exports.getInputAsArray = getInputAsArray; function getInputAsInt(name, options) { const value = Number(core.getInput(name, options)); if (Number.isNaN(value) || value < 0) { const value = parseInt(core.getInput(name, options)); if (isNaN(value) || value < 0) { return undefined; } return value;
src/utils/actionUtils.ts +2 −2 Changes for src/utils/actionUtils.ts: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -68,8 +68,8 @@ export function getInputAsInt( name: string, options?: core.InputOptions ): number | undefined { const value = Number(core.getInput(name, options)); if (Number.isNaN(value) || value < 0) { const value = parseInt(core.getInput(name, options)); if (isNaN(value) || value < 0) { return undefined; } return value; Loading