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

Commit pattern upgrade #17

Closed
wants to merge 2 commits into from
Closed

Commit pattern upgrade #17

wants to merge 2 commits into from

Conversation

Wakeful-Cloud
Copy link

Fixes #6

Changes

  • Added unit tests (Only for the new commit pattern regular expression)
  • Moved commit pattern/commit regex to a new file so the action and tests will have the same source of truth
  • Modified yarn.lock in potentially unhelpful ways

Disclaimer: I've never used Yarn before, so you should triple check yarn.lock because I might have messed up something.

commit-regex.js Outdated
@@ -0,0 +1,2 @@
//This is a common source of truth for both the actual action and unit tests
module.exports = "^v?(\\d+\\.\\d+\\.\\d+(?:-(?:alpha|beta)\\.\\d+)?)$";
Copy link
Owner

@pascalgn pascalgn Jul 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it could make more sense to have a method matchCommitMessage or so, exported in index.js, and then call that method in the test. Then there would be no need for this file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pascalgn Sorry about that. I've now exported an object containing commitRegex to reduce future changes should the need arise to export additional objects.

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.

Accept default commit messages from npm version and yarn version
2 participants