Giving regex flags
saihaj opened this issue · comments
How can I set flags to ignore case? I know it is /i
but need help with putting it in the .yml
@saihaj this is not currently supported but feel free to file a PR to add this
Hello - I would like to report that the regex flag is not working for me.
Reproduction steps:
- Create
.github/issue-labeler.yml
and.github/workflows/issue-labeler.yml
. - Use existing workflow file, version 2.2
- In issue labeler, use the following options:
cli:
- '/(cli|commandline)/i'
- Create an issue with the word "cLi", to trigger insensitivity.
- Run Action:
##[warning]Unexpected input(s) 'not-before', 'enable-versioned-regex', valid inputs are ['repo-token', 'configuration-path']
Run github/issue-labeler@v2.2
Removing label theme/cli from issue #7
(node:2602) UnhandledPromiseRejectionWarning: HttpError: Label does not exist
at /home/runner/work/_actions/github/issue-labeler/v2.2/node_modules/@octokit/request/dist-node/index.js:66:23
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:2602) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2602) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:2602) UnhandledPromiseRejectionWarning: HttpError: Label does not exist
at /home/runner/work/_actions/github/issue-labeler/v2.2/node_modules/@octokit/request/dist-node/index.js:66:23
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:2602) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by
I have even tried something simple, like so:
windows:
- '/windows/i'
As of right now, Case insensitivity is not working.
It appears that #15 may not be present in a tagged release: v2.3...master
Could a maintainer please cut a release with that support?
A workaround might be to point to the current master
branch commit: uses: github/issue-labeler@ 0207bb58c165f7229d560291b28d8de891bc46d1
, which I'll try to verify in a few minutes and report back if that does not work.
Hmm, there may be other issues with using the full SHA:
# .github/workflows/issue-labeler.yml
name: "Issue Labeler"
on:
issues:
types: [opened, edited]
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@0207bb58c165f7229d560291b28d8de891bc46d1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
enable-versioned-regex: 0
# .github/labeler.yml
wontfix:
- '/(cli|commandline)/i'
Error: Cannot find module '@actions/core'
Require stack:
- /home/runner/work/_actions/github/issue-labeler/0207bb58c165f7229d560291b28d8de891bc46d1/lib/main.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/runner/work/_actions/github/issue-labeler/0207bb58c165f7229d560291b28d8de891bc46d1/lib/main.js:19:27)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/runner/work/_actions/github/issue-labeler/0207bb58c165f7229d560291b28d8de891bc46d1/lib/main.js'
]
}
Reference: https://github.com/bflad/go-module-three/runs/2656622695?check_suite_focus=true
A new release has been cut for this