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

Use RegExp instead of micromatch. #419

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kontza
Copy link

@kontza kontza commented Feb 23, 2023

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.

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 semantic-release#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
Copy link
Author

kontza commented Feb 23, 2023

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.

@mbalc
Copy link

mbalc commented Apr 11, 2023

resolves #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)

@kontza
Copy link
Author

kontza commented Aug 4, 2023

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).

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

Successfully merging this pull request may close these issues.

2 participants