diff --git a/src/__tests__/input.test.js b/src/__tests__/input.test.js index 84164b7..ba3ac60 100644 --- a/src/__tests__/input.test.js +++ b/src/__tests__/input.test.js @@ -69,7 +69,7 @@ test("invalid keep", () => { }).toThrow() expect(() => { - new Input("owner", "repo", ["package"], ".*", 21, "token") + new Input("owner", "repo", ["package"], ".*", 101, "token") }).toThrow() }) diff --git a/src/input.js b/src/input.js index ffaad85..9d0a144 100644 --- a/src/input.js +++ b/src/input.js @@ -10,8 +10,8 @@ module.exports = class Input { throw new Error("names cannot contain more than 20 items") } else if (!versionPattern || versionPattern === "") { throw new Error("version-pattern cannot be empty") - } else if (!Number.isInteger(Number(keep)) || Number(keep) < 0 || Number(keep) > 20) { - throw new Error("keep must be an integer between 0 and 20 (inclusive)") + } else if (!Number.isInteger(Number(keep)) || Number(keep) < 0 || Number(keep) > 100) { + throw new Error("keep must be an integer between 0 and 100 (inclusive)") } else if (!token || token === "") { throw new Error("token cannot be empty") }