Hey there,
I have added a web-item to the general repo branch actions dropdown thus :
<!-- current branch actions -->
<client-web-item key="scan" name="Scan" section="bitbucket.branch.layout.actions.dropdown" weight="1000">
<label key="scan.label">Scan</label>
<link type="js">
function(ctx) {
return require('bitbucket/util/navbuilder')
.pluginServlets()
.path('myplugin', ctx.repository.project.key, ctx.repository.slug)
.withParams({'at': ctx.atRevisionRef.id})
.build();
}
</link>
<dependency>com.atlassian.bitbucket.server.bitbucket-web-api:navbuilder</dependency>
<condition class="com.atlassian.bitbucket.web.conditions.HasRepositoryPermissionCondition">
<param name="permission">REPO_ADMIN</param>
</condition>
</client-web-item>
However, I’d like to be able to send the servlet the currently displayed path within the repo branch.
The bitbucket.branch.layout.actions.dropdown
client context items are repository
and atRevisionRef
but no mention of the path.
Any ideas ?
Cheers!