Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(inputs): remove quotes in multiline inputs #121

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions __tests__/libs/inputs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe("parseInputs()", () => {
mockInputs({
releaseLabels: {
ignore: "\r\n",
patch: "patch-label-1 \r\npatch-label-2",
patch: '"patch-label: 1" \r\npatch-label-2',
minor: "\r\nminor-label",
major: "major-label\r\n",
ready: "ready-label",
Expand All @@ -128,7 +128,7 @@ describe("parseInputs()", () => {

expect(result.releaseLabels).toEqual({
ignore: ["ignore"],
patch: ["patch-label-1", "patch-label-2"],
patch: ["patch-label: 1", "patch-label-2"],
minor: ["minor-label"],
major: ["major-label"],
ready: "ready-label",
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32210,7 +32210,7 @@ const PRE_RELEASE_REGEX = /^[A-Za-z0-9-]+$/;
function parseMultipleValues(value, defaultValues) {
const values = value
.split(/\r|\n/)
.map((value) => value.trim())
.map((value) => value.trim().replace(/^["']|["']$/g, ""))
.filter((value) => {
return value.length > 0;
});
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/libs/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Inputs = z.infer<typeof inputsSchema>;
function parseMultipleValues(value: string, defaultValues: string[]) {
const values = value
.split(/\r|\n/)
.map((value) => value.trim())
.map((value) => value.trim().replace(/^["']|["']$/g, ""))
.filter((value) => {
return value.length > 0;
});
Expand Down
Loading