External Merge Hook Failure Creates Strangely Styled Popup - How Can I Change Its Style?

I recently added an External Merge Git Hook into my project to prevent anyone from merging a PR unless it has first been rebased with the branch onto which it is to be merged.

It seems to work, but for some reason, the notification/popup/tooltip produced looks like this:

Screen Shot 2017-08-21 at 15.44.47.png

How can I remove this embedded HTML so it simply shows my message? I can't seem to find anything online about it...

My git hook simply echoes "Rebase is required" then exits with a code 1, so it's not doing anything unusual.

Any help much appreciated!

2 answers

0 votes
Jeff Thomas Atlassian Team Aug 21, 2017

Hi Ryan,

Which version of Bitbucket Server are you using? Are you using something like the External Hooks add-on or are you adding the hooks manually to the repository?

If you're on Bitbucket Server 4.6+ and are using an add-on, I believe you're running into the bug described in BSERV-8606 - MergeRequest veto will display HTML tags in Merge button tooltip. Please watch that issue for updates on when it is fixed. 

I'm using v4.14.4, adding the hook through the add-on you mentioned, which seems to be baked into Bitbucket now.

The issue you mention is very much related, so I'll keep an eye on how that progresses.

Is there a workaround for now? Such as getting my hook to echo something to trick the tooltip into displaying normally?

Jeff Thomas Atlassian Team Aug 21, 2017

Hi Ryan, just confirming that I was able to reproduce this same issue with a similar setup to yours. At this time, I'm not aware of any workarounds at the moment.

I'm also looking into where the HTML is coming from since the shell script doesn't returning any and I can't see anything in External Hooks that would add it.

Thanks for your help Jeff. 

I suspect the code that generates the HTML lies within Bitbucket itself rather than External Hooks. 

If you do manage to find a workaround, that would be great, but for now we'll have to make do with an ugly notification!

Upgrading to v5.3.0 seems to have fixed the issue.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

2,368 views 9 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you