Hi guys,
I'm working on a simple forge app for Bitbucket Cloud. The app should do some stuff when a developer is pushing his/her code up to the repository.
As observed from the docs, the "avi:bitbucket:pushed:repository" event should handle this.
My manifest.yml looks like the following:
permissions:
scopes:
- 'read:repository:bitbucket'
modules:
trigger:
- key: push-event-trigger-hello-world
function: main
events:
- avi:bitbucket:created:repository
- avi:bitbucket:updated:repository
- avi:bitbucket:pushed:repository
function:
- key: main
handler: index.run
app:
id: ari:cloud:ecosystem::app/***
And my index.jsx is currently only a logger.
export async function run(event, context) {
console.log(event)
console.log("########")
console.log(context)
console.log('#######')
if ( event.eventType == "avi:bitbucket:updated:repository" )
console.log("repository update event")
if ( event.eventType == "avi:bitbucket:pushed:repository" )
console.log("repository pushed event")
}
However, the app is not receiving the "push" events; while updating or creating a repository works fine. So the app seems to have the necessary permissions, but I do not know how do solve the missing "push" events.
Are there any additional configurations necessary on the workspace or the repository?
Thanks for your help in advance
Julius
Hi Julius,
It looks like our documentation has the incorrect event name for the repository pushed event. The correct event name is 'avi:bitbucket:push:repository'. I've tested this with a Forge app and can confirm the events are working as expected.
Thanks for bringing this to our attention, we'll get the docs updated with the correct event name. Please let us know if you run into any other issues with the event.
Cheers,
Justin
Hey Justin,
thanks for your response! I tested it and it works.
Thanks!
Julius
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.