diff --git a/.github/workflows/title-checker.yml b/.github/workflows/title-checker.yml index f8d7b9d2965..b430250d2bf 100644 --- a/.github/workflows/title-checker.yml +++ b/.github/workflows/title-checker.yml @@ -42,8 +42,12 @@ jobs: echo "::error::Unable to read the pull request title from the event payload." exit 1 fi - # Same regex as the previously used deepakputhraya/action-pr-title submodule. - if ! grep -qE '\[([a-zA-Z0-9 \-_])+\]\(([a-zA-Z0-9 \-_])+\)(.*)' <<< "${TITLE}"; then + # Same character set as the previously used deepakputhraya/action-pr-title submodule, + # rewritten for POSIX ERE: that action was JavaScript, where '\-' inside a bracket + # expression escapes a literal hyphen. POSIX has no such escape -- a backslash there is + # just a backslash -- so '[a-zA-Z0-9 \-_]' made '\' a member and '-_' a range, dropping + # the hyphen itself. A literal hyphen has to be last in the bracket expression instead. + if ! grep -qE '\[([a-zA-Z0-9 _-])+\]\(([a-zA-Z0-9 _-])+\)(.*)' <<< "${TITLE}"; then echo "::error::PR title \"${TITLE}\" does not match the required pattern: [type](scope) description" gh pr comment "${PR_NUM}" --body "PR title \`${TITLE}\` does not match the required pattern: \`[type](scope) description\`" exit 1 diff --git a/.gitignore b/.gitignore index 414f79421df..7ea2d6c0f66 100644 --- a/.gitignore +++ b/.gitignore @@ -152,7 +152,6 @@ docker/runtime/be/resource/apache-doris/ # other compile_commands.json -.github # generated kuromoji dictionary binaries /be/dict/kuromoji/*.bin