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

feat: Support must_include and must_exclude regex as an array #575

Merged

Conversation

bbugh
Copy link
Contributor

@bbugh bbugh commented Aug 5, 2021

Hi! 👋 Another PR. This solves our use case raised in #573 and allows must_include to be either a string or an `array.

I imagine this would be used in other places, but I'm not sure where.

@bbugh bbugh changed the title Support must_include as an array on changeset feat: Support must_include as an array on changeset Aug 5, 2021
Copy link
Member

@shine2lay shine2lay left a comment

Choose a reason for hiding this comment

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

Looks good, just for symmetry sake, would you mind doing the same for must_exclude as well? I think you also need to update the docs and changelog

@codecov
Copy link

codecov bot commented Aug 5, 2021

Codecov Report

Merging #575 (e4697ae) into master (01fd21a) will increase coverage by 0.01%.
The diff coverage is 88.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #575      +/-   ##
==========================================
+ Coverage   92.73%   92.75%   +0.01%     
==========================================
  Files         104      104              
  Lines        2341     2345       +4     
  Branches      413      413              
==========================================
+ Hits         2171     2175       +4     
  Misses        152      152              
  Partials       18       18              
Impacted Files Coverage Δ
lib/validators/baseRef.js 100.00% <ø> (ø)
lib/validators/changeset.js 100.00% <ø> (ø)
lib/validators/contents.js 100.00% <ø> (ø)
lib/validators/description.js 100.00% <ø> (ø)
lib/validators/headRef.js 100.00% <ø> (ø)
lib/validators/label.js 100.00% <ø> (ø)
lib/validators/milestone.js 100.00% <ø> (ø)
lib/validators/title.js 100.00% <ø> (ø)
...lidators/options_processor/options/must_exclude.js 92.30% <88.23%> (+0.64%) ⬆️
...lidators/options_processor/options/must_include.js 92.30% <88.23%> (+0.64%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 01fd21a...e4697ae. Read the comment docs.

@bbugh bbugh changed the title feat: Support must_include as an array on changeset feat: Support must_include and must_exclude as an array on changeset Aug 6, 2021
@bbugh bbugh changed the title feat: Support must_include and must_exclude as an array on changeset feat: Support must_include and must_exclude regex as an array Aug 6, 2021
@bbugh
Copy link
Contributor Author

bbugh commented Aug 6, 2021

Alright, I tested locally and it's working great. I extended it to include must_exclude, added some more tests, and updated the other validators that use must_include and must_exclude to support the array format. Also added the changelog. Let me know if there's anything else you want me to address!

@bbugh
Copy link
Contributor Author

bbugh commented Aug 6, 2021

Oh, also updated the docs for the MustInclude and MustExclude pages, though I'm not sure if I got everything.

@shine2lay shine2lay merged commit 2838241 into mergeability:master Aug 7, 2021
@github-actions
Copy link

github-actions bot commented Aug 7, 2021

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants