hi,
I understand there is no implementation of requestBitbucket in forge api, so I was trying to get through fetch.
here is the code
let opts = Object.assign({
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer MY_KEY_FROM_BITBUCKET',
}
});
const response = await api.fetch('https://api.bitbucket.org/2.0/repositories/bisu85/taskytreaty/commits/', opts);
const responseBody = await response.json();
logJson(responseBody, 'data');
return responseBody;
not sure what I am doing wrong ? or is it even possible from a forge app any other way? there is no error so can’t make out how to catch this error… the api endpoint works with postman… currently I have made this public repo, but even when its private I can’t seem to get any data with bearer.
the response is always : undefined
please help, in case you have suggestions,
thanks