There's some commonly needed events that are combos of a few conditions. One example is PR "merged", GitHub does not emit such an event, it does not exist. But we could make it easier for the end-users to subscribe to it.
The idea is to synthetize fake events that would essentially implement pre-processing of any incoming events and so that the user-defined event handlers are only invoked under certain conditions. Checking the merged PR means checking two flags: closed and merged (because some closed PRs are unmerged).
Users can have a boilerplate for such event but it'd be cleaner to subscribe to a synthetic pull_request.merged event.
I think implementing this feature may also help us implement #36 using the same technique as it would be a synthetic event matching anything too.
There's some commonly needed events that are combos of a few conditions. One example is PR "merged", GitHub does not emit such an event, it does not exist. But we could make it easier for the end-users to subscribe to it.
The idea is to synthetize fake events that would essentially implement pre-processing of any incoming events and so that the user-defined event handlers are only invoked under certain conditions. Checking the merged PR means checking two flags: closed and merged (because some closed PRs are unmerged).
Users can have a boilerplate for such event but it'd be cleaner to subscribe to a synthetic
pull_request.merged
event.I think implementing this feature may also help us implement #36 using the same technique as it would be a synthetic event matching anything too.