commit-analyzer icon indicating copy to clipboard operation
commit-analyzer copied to clipboard

Use RegExp instead of micromatch.

Open kontza opened this issue 2 years ago • 3 comments

Micromatch is more geared towards path matching and that doesn't really play well with e.g. Bitbucket style pull request messages like this example:

Pull request #323: feature/SMKY-1231 Responsiveness fixes

That forward slash breaks the old micromatch based implementation. The side effect here is that releaseRules patterns must now be compilable to regular expressions.

kontza avatar Feb 23 '23 13:02 kontza

I left isString checks out on purpose:

  • If src is not a string, then the RegExp will be a funky object which won't match a string.
  • If object is not a string, then the re.test won't match.

kontza avatar Feb 23 '23 13:02 kontza

resolves https://github.com/semantic-release/commit-analyzer/issues/175 resolves #175

(I don't see the issue reference so let me attach it via a comment instead - useful to know what's the status of the issue, if it's being worked on)

mbalc avatar Apr 11 '23 11:04 mbalc

Hi, I just merged upstream with my fork so that it should be compatible with it.

Please, could this be approved & merged.

Currently I need to do some funky s..t with a Python script in our CI/CD to overwrite the analyze-commits file with my version of it to have it build it properly without it dying on Bitbucket PR formatted messages (that we have all the time).

kontza avatar Aug 04 '23 07:08 kontza