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: add support for objects in arrays in the payload filter #589

Merged
merged 4 commits into from
Sep 27, 2021

Conversation

jaredhobbs
Copy link
Contributor

This adds an additional key attribute to the must_include and must_exclude options processors.

Use case for this was for the payload filter. I needed to filter on particular labels. The labels array returns objects so I added a key attribute to be able to filter on a field in the object.

@shine2lay
Copy link
Member

@jaredhobbs could you please add documentation and an entry to changelog, thanks.

@codecov
Copy link

codecov bot commented Sep 25, 2021

Codecov Report

Merging #589 (7e04a81) into master (bb5034a) will decrease coverage by 0.02%.
The diff coverage is 87.50%.

❗ Current head 7e04a81 differs from pull request most recent head 2f42457. Consider uploading reports for the commit 2f42457 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #589      +/-   ##
==========================================
- Coverage   92.79%   92.76%   -0.03%     
==========================================
  Files         104      104              
  Lines        2358     2378      +20     
  Branches      419      425       +6     
==========================================
+ Hits         2188     2206      +18     
- Misses        152      153       +1     
- Partials       18       19       +1     
Impacted Files Coverage Δ
...lidators/options_processor/options/must_exclude.js 86.84% <78.57%> (-5.47%) ⬇️
...lidators/options_processor/options/must_include.js 94.11% <100.00%> (+1.80%) ⬆️
lib/filters/options_processor/options.js 95.00% <0.00%> (+5.00%) ⬆️

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 bb5034a...2f42457. Read the comment docs.

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.

Just have one question about whether to return false or throw error, would love to get your opinion on it. The rest looks good.

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.

LGTM

@mergeable mergeable bot merged commit 14caa46 into mergeability:master Sep 27, 2021
@jaredhobbs jaredhobbs deleted the add-payload-object-support branch September 27, 2021 16:50
@github-actions
Copy link

🎉 This PR is included in version 2.5.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