Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

"avi:bitbucket:pushed:repository" event not working properly

Julius Pravtchev April 3, 2024

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

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events