mergeable icon indicating copy to clipboard operation
mergeable copied to clipboard

Support issue_comment in filters

Open cuong-tech opened this issue 3 years ago • 2 comments

Hi,

It would be useful if we could support issue_comment in filters: https://github.com/mergeability/mergeable/blob/7d9efc55ba0d1d5f251aea8bc79a54e0e580a4e5/lib/filters/payload.js#L23-L30

The use case is developers can just add a comment merge to trigger the merge action

  - when: issue_comment.created
    name: 'Merge on comment'
    filter:
      - do: payload
        comment:
          body:
            must_include:
              regex: 'merge'
    validate: []
    pass:
      - do: merge
        merge_method: "rebase"

Is it just a matter of adding issue_comment.* to the supportedEvents array?

Thanks!

cuong-tech avatar May 17 '22 13:05 cuong-tech

@jusx @shine2lay May I have the benefit of your thoughts on this issue?

cuong-tech avatar Jun 01 '22 13:06 cuong-tech

hey @cuong-tech yes, and you'll need to make sure issue_comment.* payload have the necessary fields for the actions/validators. That is the main reason why we didn't add all events from the beginning since we haven't test it against all events and they sometimes have different payload

shine2lay avatar Jun 01 '22 14:06 shine2lay