Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed in trying to set up email notification on Pull request merged event

Rathan Kumar April 19, 2018

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

1 answer

1 accepted

0 votes
Answer accepted
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 13, 2018

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

Rathan Kumar May 15, 2018

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events