Skip to content

Commit 488386f

Browse files
committed
fix: delimit add_labels using comma
It should be possible to add labels that contain spaces. So we need to find another delimiter. GitHub does not seem to support labels that include commas, so we can use this instead.
1 parent b237b4f commit 488386f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ By default, the original author is not made an assignee.
118118

119119
Default: `''` (disabled)
120120

121-
The action will add these labels (space-delimited) to the backport pull request.
121+
The action will add these labels (comma-delimited) to the backport pull request.
122122
By default, no labels are added.
123123

124124
### `branch_name`

action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ inputs:
99
By default, the original author is not made an assignee.
1010
add_labels:
1111
description: >
12-
The action will add these labels (space-delimited) to the backport pull request.
12+
The action will add these labels (comma-delimited) to the backport pull request.
1313
By default, no labels are added.
1414
branch_name:
1515
description: >

src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async function run(): Promise<void> {
8282
pull: { description, title, branch_name },
8383
copy_labels_pattern:
8484
copy_labels_pattern === "" ? undefined : new RegExp(copy_labels_pattern),
85-
add_labels: add_labels === "" ? [] : add_labels.split(/[ ]/),
85+
add_labels: add_labels === "" ? [] : add_labels.split(/[,]/),
8686
target_branches: target_branches === "" ? undefined : target_branches,
8787
commits: { cherry_picking, merge_commits },
8888
copy_assignees: copy_assignees === "true",

0 commit comments

Comments
 (0)