Manifest

About

The manifest files describes a Forge app. It’s created as part of the Forge CLI’s forge create with filename manifest.yml. The manifest uses YAML syntax.

Properties

The manifest contains two top-level properties, app and modules.

PropertyRequiredDescription
appYesInformation to identify the app, including name and Atlassian Resource Identifier (ari). These are populated as part of the forge create command.
modulesYesA list of all the modules used by the app.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
app:
  id: 'ari:cloud:ecosystem::app/406d303d-0393-4ec4-ad7c-1435be94583a'
  name: my-cool-forge-app
modules:
  macro:
    - key: hello-world-macro
      function: hello-world-macro-func
      title: Hello world macro!
      description: Inserts Hello world!
  webtrigger:
    - key: webtrigger-sync
      function: my-forge-app-sync-func
    - key: my-webtrigger-async
      function: my-async-func
  trigger:
    - key: issue-creation-trigger
      events: 
        - avi:activity:created:issue
        - avi:activity:updated:issue
      function: issue-trigger-func
  function:
    - key: my-forge-app-sync-func
      handler: index.runSync
    - key: my-async-func
      handler: index.runAsync
    - key: hello-world-macro-func
      handler: macro.run
    - key: issue-trigger-func
      handler: jira.issueCreationTrigger

Function

A function module is where the app's behaviour is defined. Other modules specify the function module that defines the the actions to take.

Properties

PropertyTypeRequiredDescription
key

string

Pattern: ^[a-zA-Z0-9_\\-\\.]+$\

YesA key for the module, which other modules can refer to. Must be unique within the manifest and have a maximum of 23 characters.
handler

string

Pattern: ^[a-zA-Z0-9_\\-\\.]+$\

Yes

A pointer to the function responsible for handling invocations.

Expected format: file.function

For example, jira.issueCreationTrigger calls the issueCreationTrigger function defined in jira.js in the root directory of the app.

Macro

A macro modules inserts dynamic content into a Confluence page. Macros display in the quick insert menu of the Confluence editor and are implemented by a Forge function.

Properties

PropertyTypeRequiredDescription
key

string

Pattern: ^[a-zA-Z0-9_\\-\\.]+$\

YesA key for the module, which other modules can refer to. Must be unique within the manifest.
functionstringYesA reference to the function module that defines the macro.
titlestringYesThe title of the macro displayed in the Confluence editor.
descriptionstringThe description of the macro displayed in the Confluence editor.

Trigger

A trigger module invokes a function when a product event is fired. For example, as the result of an issue being created in Jira.

PropertyTypeRequiredDescription
key

string

Pattern: ^[a-zA-Z0-9_\\-\\.]+$\

YesA key for the module, which other modules can refer to. Must be unique within the manifest.
functionstringYesA reference to the function module that defines the macro.
eventsArray<string>YesA list of product events that trigger the function.

Web trigger

A webtrigger module invokes a function as the result of an HTTP request. To obtain a the URL to call a web trigger, define a webtrigger module then run forge webtrigger the Forge CLI.

Properties

PropertyTypeRequiredDescription
key

string

Pattern: ^[a-zA-Z0-9_\\-\\.]+$\

YesA key for the module, which other modules can refer to. Must be unique within the manifest.
functionstringYesA reference to the function module that defines the macro.

Example web trigger URL

1
https://406d303d-0393-4ec4-ad7c-1435be94583a.hello.atlassian-dev.net/x0/eyJjdHgiOiJhcmk6Y2xvdWQ6Y29uZmx1ZW5jZTo6c2l0ZS9EVU1NWS0xNThjODIwNC1mZjNiLTQ3YzItYWRiYi1hMDkwNmNjYzcyMmIiLCJleHQiOiJhcmk6Y2xvdWQ6ZWNvc3lzdGVtOjpleHRlbnNpb24vNDA2ZDMwM2QtMDM5My00ZWM0LWFkN2MtMTQzNWJlOTQ1ODNhL2ZjMTI1ZTY3LTY0MTItNGVjNi04OTRhLWU5OTVjZjcyZDcyYS9zdGF0aWMvd2VidHJpZ2dlci1zeW5jIn0