The Product bridge API is a JavaScript API that enables UI Kit 2 and custom UI apps to securely integrate with Atlassian products.”
requestBitbucket
is not available in @forge/bridge
. You can't make product fetch requests from the front end of a UI Kit 2 app. To work around this, use resolver functions.
Install the product bridge API using the
@forge/bridge npm package.
Import @forge/bridge
using a bundler, such as Webpack.
You can start by creating a new app from one of the custom UI templates.
In the static/hello-world
directory, run npm install && npm build
to bundle the
static web application template with the product bridge API into the static/hello-world/build
directory. Use this directory as the resource path in the Forge app's manifest.yml
.
In the template, use the bridge in static/hello-world/src/App.js
like this:
1 2import { invoke } from '@forge/bridge'; invoke('getText', { example: 'my-invoke-variable' }).then(setData);
Rate this page: