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 vote
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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Asked 4 hours ago in Confluence

What are the resources that you use to learn more about Atlassian Products?

I am gathering information about resources available for Atlassian product knowledge transferring for a presentation in our local Atlassian User Group. I want to group them in four categories From ...

36 views 3 3
View question

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