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

Copy labels as specified by copy_labels_pattern #327

Merged
merged 7 commits into from
Feb 23, 2023
Merged

Copy labels as specified by copy_labels_pattern #327

merged 7 commits into from
Feb 23, 2023

Conversation

korthout
Copy link
Owner

Introduces a new input copy_labels_pattern.

When set, the action copies labels from the original pull request to the created backport pull requests when they match the provided pattern (excluding labels matching the label_pattern).

By default, no labels are copied.

Many thanks to @lheckemann for this contribution. See #314.

Resolves #87

lheckemann and others added 7 commits February 14, 2023 22:18
It's not clear how null as a default would behave from the Github Docs.
However, the Docs are clear about what happens when an input is not
provided when it is not required: it becomes an empty string.
It was attempting to add labels, even when it didn't find any to copy.
Not sure if this would actually cause any issues, but `[string]` is
different from `string[]`. The latter is a string array, the first is an
array consisting of 1 string element. This should've prevented us from
passing an empty array and passing an array with multiple elements, but
I guess this doesn't work too well in TS. It's also not what we want.
The default is an empty string, which disables the copy labels behavior.

This input should also be documented in the trigger using a comment
workflow example.
@korthout
Copy link
Owner Author

Tested successfully: results.

@korthout korthout merged commit a15b77d into main Feb 23, 2023
@korthout korthout deleted the copy-labels branch February 23, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port origin PR labels to backport PR
2 participants