Bitbucket Scriptrunner Listner

Hamdy Atakora March 18, 2021

Hello and thank you in advance for the assistance.

I am trying to write a listener for Bitbucket repositories but i am not sure where to start or to go about it.

I am trying to write a listener to on all changes in repositories specifically MergedEvent.

I want to listen for events where a a branch is merged with another matching the condition if the pull request content files with a certain extension.

As a result send an HTTP request with the file name, repository name and other info i can get.

2 answers

0 votes
Robert Giddings [Adaptavist]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 13, 2021

Hi @Hamdy Atakora ,

If you also have ScriptRunner for Bitbucket available from the marketplace here: https://marketplace.atlassian.com/apps/1213250/scriptrunner-for-bitbucket you can write custom Listeners, as you have described.

Here is the relevant documentation for ScriptRunner for Bitbucket: https://docs.adaptavist.com/sr4bib/latest/features/listeners

Kind regards,

Robert Giddings,

Product Manager, ScriptRunner for Bitbucket

0 votes
Leo
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 19, 2021

Hi @Hamdy Atakora,

There is a event handler comes with scriptrunner and available in Repo Settings

you can try out the logics over there, also you can utilize sample snippets available like changed file PR source branch and target branch, etc. 

Hope this helps

 

BR,

Leo

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events