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

Valid regex seemingly fails silently? #103

Open
ChasNelson1990 opened this issue Dec 16, 2021 · 1 comment
Open

Valid regex seemingly fails silently? #103

ChasNelson1990 opened this issue Dec 16, 2021 · 1 comment

Comments

@ChasNelson1990
Copy link

Hi there.
Just started using this action so if I'm doing something silly please let me know but I can't seem to get valid parenthesis-related regex statements working in my labeler.yml.

PR title is: "build(deps): apply minor and patch dependency updates test" - we use both "^build(deps): ." and "^build(dev-deps): ." commit and PR title tags and I'd like to catch both and apply a "dependencies" label.

The following labeler.yml catches that PR title and succesfully applies the label:

version: v1

labels:
  - label: "dependencies"
    sync: true
    matcher:
      title: "^build.*"
      commits: "^build.*"

However, to use parentheses I am obviously going to have to escape them. \( isn't valid YAML so I went for \x28 instead and came up with the following valid regex:

title: "^build\x28(deps|deps-dev)\x29: .*"

However, the action then does nothing - officially passed but gives no useful logging output and doesn't apply the label.

Is there a debug flag for getting useful logging? And should valid regex like this work?

Any help much appreciated.

@baptiste0928
Copy link

Had the same issue, escaping the backslash with another one worked:

 title: "^build\\(deps|deps-dev\\): .*"

@fuxingloh fuxingloh pinned this issue Dec 29, 2021
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

No branches or pull requests

2 participants