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 team option to author filter #696

Merged
merged 2 commits into from
Feb 20, 2023
Merged

feat: Add team option to author filter #696

merged 2 commits into from
Feb 20, 2023

Conversation

robinmayerhofer
Copy link
Contributor

@robinmayerhofer robinmayerhofer commented Feb 3, 2023

Goal

Add a way to change behavior based on team membership.

This PR adds the team option to the author filter.
If the team is set, then it is verified that the author is part of the team, otherwise, the filter fails.

Together with #695, this enables checking whether an author is not part of a team.

How

I added team: 'string' to the supported settings of the author filter.
Then, I added a TeamProcessor that uses the existing functionality for Teams from the validators to check whether the user is part of the team.

@robinmayerhofer robinmayerhofer marked this pull request as ready for review February 20, 2023 13:37
@robinmayerhofer
Copy link
Contributor Author

Hi @shine2lay - this is another small feature, I rebased it on top of master after the previous PR was merged 🙂

@codecov
Copy link

codecov bot commented Feb 20, 2023

Codecov Report

Base: 93.04% // Head: 93.07% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (de29051) compared to base (13a628b).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head de29051 differs from pull request most recent head 39ca6e6. Consider uploading reports for the commit 39ca6e6 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #696      +/-   ##
==========================================
+ Coverage   93.04%   93.07%   +0.02%     
==========================================
  Files         109      110       +1     
  Lines        2474     2483       +9     
  Branches      445      445              
==========================================
+ Hits         2302     2311       +9     
  Misses        153      153              
  Partials       19       19              
Impacted Files Coverage Δ
lib/filters/author.js 100.00% <ø> (ø)
lib/filters/options_processor/options/team.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@shine2lay shine2lay merged commit 903d5e8 into mergeability:master Feb 20, 2023
@github-actions
Copy link

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