Fwd: How to detect on pull request merged with when conditions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: How to detect on pull request merged with when conditions

Santiago Fraire Willemoës

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
when {
branch "master"
}
or
when {
changeRequest()
}

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!

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CACqZ8HRHBtDt0yu-rZmo7FcbqR0J4UcbT8DayB-ZAhsOxRtxSA%40mail.gmail.com.