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:
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!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.