fleaz / CptHook

Receive webhooks from different applications and post them to IRC channels
MIT License
17 stars 8 forks source link

gitlab: use HookActions map only if it is necessary #56

Closed herbetom closed 3 years ago

herbetom commented 3 years ago

Since Gitlab 13.2 an approve and unapprove Action is available in Core: https://gitlab.com/help/user/project/merge_requests/merge_request_approvals#optional-approvals-core-only

The intent with this PR is to only use the Value form the HookAction if a value is found. Whether this is really what happens must be tested by someone. I have no environment in which I could easily test this.

mweinelt commented 3 years ago

Does it make sense to fallback to the raw value and not map values where in == out? This has the added benefit to be more accepting of new states.

herbetom commented 3 years ago

Yes, that makes perfect sense. It's just more "complicated" to implement.

herbetom commented 3 years ago

@fleaz Could this work?

fleaz commented 3 years ago

Hey @herbetom, sorry for the delay.

This looks good to me, and also thanks to @mweinelt to the requested change.

Can you change your PR to target the development branch, than I will merge this :+1:

herbetom commented 3 years ago

I changed the target branch. We will see if it works :man_shrugging:

fleaz commented 3 years ago

LGTM :+1: