Skip to content

Commit

Permalink
Adjust limits to new maximum of 100 versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rubengees committed Nov 19, 2020
1 parent a5852ee commit 790e21a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/input.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ test("invalid keep", () => {
}).toThrow()

expect(() => {
new Input("owner", "repo", ["package"], ".*", 21, "token")
new Input("owner", "repo", ["package"], ".*", 101, "token")
}).toThrow()
})

Expand Down
4 changes: 2 additions & 2 deletions src/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 790e21a

Please sign in to comment.