I am just testing the example from Bitbucket
That is the manifest.yml file
modules:
trigger:
- key: product-trigger-hello-world
function: main
events:
- avi:jira:created:issue
function:
- key: main
handler: index.run
app:
runtime:
name: nodejs20.x
id: ari:cloud:ecosystem::app/5afcdec7-11ad-481e-9512-c0dd41bfa26d
permissions:
scopes:
- read:jira-work
# TODO: Add the REST API Scope
- write:jira-work`
and this is the index.jsx
// TODO: Add import statements here please
import api, { route } from “@forge/api”;
export async function run(event, context) {
console.log(‘Hello World!’);
console.log(event);
// TODO: Add the REST API call here
var bodyData = `{
"body": "The summary is: ${event.issue.fields.summary}"
}`;
var issueIdOrKey = event.issue.id; // TODO: find the value
const response = await api.asApp().requestJira(route`/rest/api/2/issue/${issueIdOrKey}/comment`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
I run my developer site on *.atlassian.net and all commands work without error
forge deploy
forge install --upgrade
forge tunner
However, when I create a ticket, I receive:
**ERROR 06:05:48.124 fcc39ac4-2117-4289-a885-fe268c3406d8 [REQUEST_EGRESS_ALLOWLIST_ERR: URL not included in the external fetch backend permissions: /rest/api/2/issue/10015/comment. Visit go.atlassian.com/forge-egress for more information.] {**
** status: 403**
**}**
Adding external permission, as recommended in the documentation doesn't make sense and also doesn't change the write error. Any clues what I do wrong in following the example steps?
**Update:** is seems that the write:jira-work permission scope isn't recognised. Here the forge install output (I redid the demo)
…
Your app will be installed with the following scopes:
- read:jira-work
? Do you want to continue? (y/N)
Deleting all permissions and running `forge lint` also does add only read permission.