Hi,
i am trying to set up email notifications on pull request even through Bitbucket UI.
I have already set up post hook for the repository to trigger emails on merge to master.
but i would like to trigger email on pull request merged event.
Tried this configuration in scriptrunner event handler for PullRequestMergedEvent
condition
event.pullRequest.toRef.displayId == "master"
How do i find the methods of pullrequest class.
what methods can i use to send mail
i want to get username of the user who merged the PR and the repository name of the event generated.
Thanks,
Rathan
Hi @Rathan Kumar,
It seems that you are using Bitbucket Server (self-hosted by your company).
If that's the case, another option could be to upgrade to Bitbucket Server 5.10 (or higher) to take advantage of the improved notifications:
- see Bitbucket Server 5.10 release notes for reference
The pull request is merged is one of the available events that can trigger a notification. It is true that, at this stage, we cannot add any control for the target branch.
Would this be enough to achieve your goal?
If you can share the exact desired requirement, we can try to add more specific instructions.
Let us know if this is about bitbucket.org (hosted by Atlassian instead).
Cheers,
Caterina - Atlassian
Hi @Caterina Curti,
Thanks for your response, yes we have upgraded bitbucket to 5.10.
it has watch the repositories and its branches feature.
Thanks,
Rathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.