Hi, I have a few binary files which obviously by default don't show a diff view (instead it just says 'Binary file modified.'). However, while these files need to be in binary form in source control, I have some code which can read the files and show a more useful text representation, which could then provide a useful diff view.
I would like to create an add-on which can provide its own diff view for these files when viewing a pull request. Is it possible to achieve what I want with Atlassian Connect (bitbucket-connect)? The most relevant thing I can see in the documentation is the web items module, which has an org.bitbucket.pullrequest.summary.info location, but I can't find any reference to this in the html and it's not clear what part of the page this would actually link to...
Community moderators have prevented the ability to post new answers.
Hi Jamey,
You can't currently override the diff view, but you can override the source view using the File View add-on module. It wouldn't change the view on the pull request, but your users would be able to click the "View File" link for the binary file on the pull request to view the textual representation of the binary.
Long term, it might be best to raise a feature request detailing your use-case and requesting a diff extension point. Bitbucket Server has one, so it's definitely a possibility.
As an alternative, you could add use that web-item to link off to a custom diff view on a different page, but the the link is rendered per pull request, rather than per file. org.bitbucket.pullrequest.summary.info
is rendered in the top right:
Pull request #5: Another branch — Bitbucket 2016-09-08 09-06-03.png
You can use the Location, Location, Location to discover other supported web-item locations if you like.
Hope this helps!
cheers,
Tim
Hi Tim, thanks for your reply. I'm going to raise a feature request and see what they say.
Also, thanks for the link to the location, location, location add-on. That's a great way to understand what locations do, I'm surprised it's not somewhere obvious in the documentation..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Jamey Holden
~~I'm also really interested in this feature. Could you tell me where you raised this feature request?~~
After some more searching I found the feature request here: https://bitbucket.org/site/master/issues/13269/add-an-extension-point-for-the-pull
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.