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

slashes confuse the checker? #30

Open
srl295 opened this issue Mar 4, 2021 · 3 comments
Open

slashes confuse the checker? #30

srl295 opened this issue Mar 4, 2021 · 3 comments

Comments

@srl295
Copy link
Member

srl295 commented Mar 4, 2021

over on unicode-org/cldr#1085 the following text failed both PR title and Commit title validation:

  • CLDR-14395 /api/auth endpoints

with "PR must begin with a Jira ticket ID" etc.

Changing to CLDR-14395 API for … fixed it. Something with slashes?

@sffc
Copy link
Member

sffc commented Mar 4, 2021

The following regex is used:

const JIRA_COMMIT_PATTERN = /^([A-Z]+-\d+)\u0020\w/;

So it's looking for a \w. This is to ensure that there's something besides whitespace following the Jira ticket number.

Suggestions for a better regex? Unicode letter property? (That won't fix the slash problem.) Maybe just \S?

@markusicu
Copy link
Member

How about

const JIRA_COMMIT_PATTERN = /^([A-Z]+-\d+)\u0020\w/;

-->

const JIRA_COMMIT_PATTERN = /^((CLDR|ICU)-\d+) [\p{L}\p{N}\p{P}\p{S}]/u;

If \p{L} does not work, try \p{gc=L}.

@macchiati
Copy link
Member

macchiati commented Mar 5, 2021 via email

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

4 participants