Developer
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Forge modules
Automation modules (Preview)
Bitbucket modules
Compass modules
Confluence modules
Dashboard modules (EAP)
Jira modules
Jira Service Management modules
Jira Software modules
Rovo modules
Teamwork Graph modules
Last updated Nov 24, 2025

Bitbucket repository code file viewer

The bitbucket:repoCodeFileViewer module adds a dropdown item to the dropdown of the Bitbucket file content header. When you select the menu item, the file content will be rendered using the custom file viewer. You can use UI Kit or Custom UI to create the custom file viewer.

Example of repo code file viewer

Properties

PropertyTypeRequiredDescription
key

string

Yes

A key for the module, which other modules can refer to. Must be unique within the manifest.

Regex: ^[a-zA-Z0-9_-]+$

resourcestringIf using Custom UI or modern versions of UI KitThe key of a static resources entry that your module will display. See resources for more details.
render'native'If using modern versions of UI KitIndicates the module uses UI Kit.
resolver{ function: string } or
{ endpoint: string }

Set the function property if you are using a hosted function module for your resolver.

Set the endpoint property if you are using Forge Remote to integrate with a remote back end.

titlestring or i18n objectYes

The title of the file viewer, which is displayed as a dropdown item.

The i18n object allows for translation. See i18n object.

filePatternstringNo

The regex pattern specifying which files the file viewer should be available for. The pattern matching is case-insensitive.

For example, to make it available for all markdown files, use ".*\\.md$". This pattern matches both .md and .MD file extensions.

If unspecified, it will be available for all files.

i18n object

KeyTypeRequiredDescription
i18nstringYesA key referencing a translated string in the translation files. For more details, see Translations.

Extension context

UI Kit and Custom UI

Use the useProductContext hook to access the extension context in UI Kit or getContext bridge method in Custom UI.

PropertyTypeDescription
typestringThe type of the module.
repositoryobjectThe repository where the file is located.
repository.uuidstringThe repository UUID which will be wrapped in {}.
file.pathstringThe file path relative to the repository root.
commit.hashstringThe commit hash (SHA) of the branch.
locationstringThe full URL of this page.

Rate this page: