I have been playing around with the various plugin tutorials for Bitbucket Server using atlas-sdk and have a very specific idea for a plugin that would help us enormously in our organisation. I am looking to extend the ‘Compare’ function to provide some specific information; basically it performs a diff between two refs in our release repository and processes that further for the benefit of our testers. Getting the actual diff part of the plugin to work (and presenting it in the plugin via, for example, a bitbucket.repository.general decorator) is OK - that part is working fine. So at the moment, I can get the extended diff working on a separate page but only by providing the refs to compare via attributes in the URL. I’d like to be able to leverage the functionality available in the Bitbucket ‘Compare’ tool and include my servlet there.
I can extend the bitbucket.repositories.compare.nav section to add a new menu item (alongside ‘Diff’ and ‘Commits’ - see attached picture) but I can’t figure out a way to join these two together in a ‘presentable’ fashion. The nicest solution would be if Atlassian provided a bitbucket.repository.compare plugin decorator but that doesn’t appear to be available.
Does anyone have any tips on how I might either:
a) Be able to include the rendered results of my Servlet under the new ‘Build Info’ tab on the ‘Compare’ page (as in the attachment) without an available plugin decorator?
b) Alternatively create a whole new page somewhere else, but still use the branch/tag selectors somehow to get the ref names without having to give them manually in the URL?
Hopefully what I am trying to achieve it makes sense …
Looking forward to any feedback.