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

Ryan Beard August 21, 2017

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
Ryan Beard August 24, 2017

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

0 votes
Jeff Thomas
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 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. 

Ryan Beard August 21, 2017

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
Atlassian Team members are employees working across the company in a wide variety of roles.
August 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.

Ryan Beard August 22, 2017

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!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events