You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So if nothing matches, it will add the label "unknown"
I was thinking you could add a config option where it would return on the first match instead of looping through each (then it would use the * as the fallback if nothing else matched). Does that seem feasible?
The text was updated successfully, but these errors were encountered:
This might be a lot easier to do using the action config instead of in the tags yml.
For example:
steps:
- uses: TimonVS/pr-labeler-action@v3with:
default-label: 'unknown'# Any PR not matching one of the rules gets this labelenv:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Can be done by a default-label string option, or by having a first-match-only boolean option.
An interesting thing to keep in mind, a "default label" would be slightly different behavior than a "first match only" in more complex configurations.
Great idea. We cannot use the syntax you originally proposed because it's already occupied (currently, this will always add the label, regardless of any other matches). @w5l's proposal should work though! This should be relatively easy to implement, feel free to open a PR for it if you wish.
I'd like to have a fallback label applied without any matches.
So if nothing matches, it will add the label "unknown"
I was thinking you could add a config option where it would return on the first match instead of looping through each (then it would use the
*
as the fallback if nothing else matched). Does that seem feasible?The text was updated successfully, but these errors were encountered: