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 options 'one_of' and 'none_of' for filters and validators #758

Conversation

andekande
Copy link
Contributor

@andekande andekande commented Jun 19, 2024

Add options 'one_of' and 'none_of'.
Support in filters payload, author, and in action lastComment to filter comments authors.
Usage Example:

    version: 2
    mergeable:
      - when: issue_comment.*
        name: "Merge pull requests when requested via comment"
        filter:
          - do: payload
            sender:
              login:
                must_exclude:
                  regex: '\[bot\]$'
                none_of: ['@author']
        validate:
          - do: lastComment
            must_include:
              regex: 'merge$'
              message: 'Comment "merge" detected, going to merge the PR.'
            comment_author:
              one_of: ['@org/product-owners-team']
              none_of: ['@author', 'shady-product-owner']
        pass:
          - do: merge
            merge_method: "squash"

@andekande andekande force-pushed the one_of-option-for-filter-and-validator branch 4 times, most recently from 305581e to c421998 Compare June 20, 2024 21:18
@andekande
Copy link
Contributor Author

@shine2lay something went wrong with the master merge - i am having a look right now

@andekande andekande force-pushed the one_of-option-for-filter-and-validator branch 2 times, most recently from d93bc55 to a7eefe8 Compare June 20, 2024 22:18
@andekande
Copy link
Contributor Author

@shine2lay resolved, all green

@andekande
Copy link
Contributor Author

With all these additions the docu site at https://mergeable.readthedocs.io could benefit of an update.
Seems not to be automated on a release...

@shine2lay shine2lay merged commit 62481ab into mergeability:master Jun 21, 2024
2 checks passed
Copy link

🎉 This PR is included in version 2.21.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@andekande andekande deleted the one_of-option-for-filter-and-validator branch June 21, 2024 13:21
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.

None yet

2 participants