Ref Metadata Provider Plugin Module

Introduction

Ref metadata provider modules are used to associate metadata to refs (branches or tags) within a repository in Bitbucket Server. This metadata can be accessed via REST when retrieving a list of branches and then can then (optionally) be used to display additional columns within the branch listing table.

Please see the how-to guide to see the ref metadata provider in action.

Configuration

Attributes

Name Required Description Default
key The identifier of the plugin module. This key must be unique within the plugin where it is defined. N/A
class The fully qualified Java class name of the hook. This class must implement RefMetadataProvider N/A
name The human-readable name of the plugin module. N/A

Elements

Name Required Description Default
description The description of the plugin module. The 'key' attribute can be specified to declare a localisation key for the value instead of text in the element body. N/A

Simple Example

Here is an example atlassian-plugin.xml file containing just a ref metadata provider.

<atlassian-plugin name="My Ref Metadata Provider Example" key="example.plugin.myprovider" plugins-version="2">
    <plugin-info>
        <description>A basic ref metadata provider plugin</description>
        <vendor name="My Company" url="http://www.mycompany.com"/>
        <version>1.0</version>
    </plugin-info>

    <ref-metadata-provider key="example-metadata" name="Branch color provider" class="com.mycompany.example.plugin.myprovider.MyRefMetadataProvider" />

</atlassian-plugin>

More Examples

You can find a more concrete example in the how-to guide.