mergeability / mergeable

🤖 All the missing GitHub automation 🙂 🙌
https://mergeable.us
GNU Affero General Public License v3.0
679 stars 120 forks source link

feat: Add options 'one_of' and 'none_of' for filters and validators #758

Closed andekande closed 2 months ago

andekande commented 2 months ago

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 commented 2 months ago

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

andekande commented 2 months ago

@shine2lay resolved, all green

andekande commented 2 months ago

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...

github-actions[bot] commented 2 months ago

:tada: This PR is included in version 2.21.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: