Ref metadata provider modules are used to associate metadata to refs (branches or tags) within a repository in Bitbucket Data Center. 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.
Name | Required | Description | Default |
---|---|---|---|
key | Yes | The identifier of the plugin module. This key must be unique within the plugin where it is defined. | N/A |
class | Yes | 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 |
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 |
Here is an example atlassian-plugin.xml
file containing just a ref metadata provider.
1 2<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>
You can find a more concrete example in the how-to guide.
Rate this page: