Hi all,
I’m sorry in advance if my terminology is not correct.
I’m developing my first atlassian-connect app and trying to create a pre-push WebHooks.
currently I only get post-push events repo:push
this is my atlasian-connect.json file:
{
"key": "<app-key>",
"name": "my app",
"description": "desciption",
"vendor": {
"name": "EDITME",
"url": "https://www.atlassian.com/EDITME"
},
"baseUrl": "https://cc578aa8.ngrok.io",
"authentication": {
"type": "jwt"
},
"lifecycle": {
"installed": "/installed",
"uninstalled": "/uninstalled"
},
"modules": {
"webhooks": [
{
"event": "*",
"url": "/webhook"
}
],
"repoPages": [
{
"url": "/connect-example?repo_uuid={repo_uuid}",
"name": {
"value": "<value>"
},
"location": "org.bitbucket.repository.navigation",
"key": "<key>",
"params": {
"auiIcon": "aui-iconfont-pages"
}
}
]
},
"scopes": ["account", "repository"],
"contexts": ["account"]
}
and I have a app.post('/webhook')
in my app.js file that listens to the those events.
how will be best to implement this, also I want to be able to block the push depending on the success / failure of my functionality…
I understand that this may seem like a plugin… is there a way to create a plugin like this in atlassian-connect?
Thanks!