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
When I type (?i) into a regex rule, then the runner throws an error.
Action version:
Latest version.
Platform:
Ubuntu
macOS
Windows
Runner type:
Hosted
Self-hosted
Repro steps:
Add the following rule to labeler.yml:
SOMELABEL:
- head-branch: '^(?i)(a).*'
Expected behavior:
The error shouldn't be thrown.
Actual behavior:
GitHub Actions runner on ubuntu-latest throw the following error:
The configuration file (path: .github/labeler.yml) was not found locally, fetching via the api
Error: SyntaxError: Invalid regular expression: /^(?i)(a).*/: Invalid group
Error: Invalid regular expression: /^(?i)(a).*/: Invalid group
The text was updated successfully, but these errors were encountered:
Hi @cjxe , We did the initial investigation and it looks like the regex mentioned in the issue seems to be syntactically wrong, can you please help us to understand the use case of the regex or what exactly are you looking to achieve so that we could understand it better and come up with a solution.
Hi @cjxe , Thank you for responding and providing us more details. As you have mentioned in the screenshot you have selected PCRE2 (regex flavour) to compile the mentioned regex code. (?i) modifier is not supported by all the regex flavours, actions/labelers uses javascript behind the scenes hence you would need to modify to something that would work on javascript flavour. We would recommend the following change :- “^(a|A).*” in the regex for the mentioned use case. Kindly refer to following workflow run and labeler.yml config file for more details.
Description:
When I type
(?i)
into a regex rule, then the runner throws an error.Action version:
Latest version.
Platform:
Runner type:
Repro steps:
Add the following rule to
labeler.yml
:Expected behavior:
The error shouldn't be thrown.
Actual behavior:
GitHub Actions runner on ubuntu-latest throw the following error:
The text was updated successfully, but these errors were encountered: