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

How to capture PR creation event in BitBucket?

Jayadev Pentapati August 29, 2020

Hi Team,

I have a requirement to run a script when there is a PR(PullRequest) created over bitbucket server. The script further require to capture the PR reviewer details once the PR is raised.

Same time, Do not want to trigger a build in bamboo up on PR creation.

I have different thoughts,

1) Through BB API's, Poll the PR creation page until PR creation event occurs - Not a good idea to continuously poll server page using API's

 2) checking for any GIT CLI commands to list the latest PR event, so those GIT commands could be incorporated in script and figure out the PR creation. -- Not found any useful GIT commands.

3) If any logs that captures the PR event (could be audit or any server specific logs which keeps track of the events), that log could be given as input to script to identify for the PR creation event in logs may be  based on time stamps or PR creation related keywords

 

I feel and positive about option 3 for now. if its feasible to identify PR events in any of the logs or in unique files which records this data, please let me know which will be of a great help/

 

Also Great if there is any other best approaches to capture the PR creation event and PR reviewers through scripting. ( just need to know where can it be identified, can think about how later on. .. )

 

Thanks,

Jay

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events