mergeable icon indicating copy to clipboard operation
mergeable copied to clipboard

Despite the regex expression in the yml file is `case-sensitive`, the CI handles the PR title as `case-insensitive`

Open yukinoda opened this issue 3 years ago • 3 comments

Despite the regex expression in the yml file is case-sensitive, the CI handles the PR title as case-insensitive

mergeable.yml

        must_include:
          regex: ^((DEV)-[\d]{1,6})\:.+$
          message: 'Add JIRA issue key'

Both PR titles successes:

  1. DEV-000: random title
  2. Dev-000: random title

yukinoda avatar Mar 23 '22 09:03 yukinoda

Is this expected to be case-insensitive?

yukinoda avatar Jul 08 '22 18:07 yukinoda

@yukinoda we use https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp to test regex. maybe it requires extra flag to make it case-sensitive

shine2lay avatar Jul 08 '22 19:07 shine2lay

Looking trough the code it apperantly forces the i regex flag (meaning case insensitive). The solution is to add

regex_flag: "none"

RapGeneral avatar Jun 09 '23 13:06 RapGeneral