Hello everyone, I've been trying to trigger a build on a merged PR. This is different to triggering the branch that was merged to.
I have these conditions that are working fine
or
But I'm missing something like:
when {
changeRequest(status = "merged")
}
Any idea how to do this? My objective is to do some cleanup of preview environments, in order to do this I need to know the PR ID.
I'm using bitbucket post webhook and in Jenkins I use "Bitbucket Branch Source Plugin". I know that the "event" is being sent to Jenkins because it is checked in the webhook.
Any suggestions?
Regards!