Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to notify that a Pull Request is a certain age

Justin Hunt April 17, 2025

Hi,

Wanted to know if there is a way to reference the API to get the age of a pull request from its creation? I am investigating ways to send mattermost messages to our team via webhook from bitbucket for forgotten pull request (PRs older than a certain amount of time).  Thanks!

2 answers

1 accepted

0 votes
Answer accepted
Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
April 21, 2025

If well-designed and tested apps are not for you, you can set the auto-decline (forgotten) period in BB repo settings and then add a webhook that signals your external system when the PR 'declined' event occurs.

Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
April 21, 2025

BTW, if you change your mind re apps, we've got a solution that will solve all your problems.

Justin Hunt April 22, 2025

Thank you! Great suggestion!

1 vote
Uladzislava Kastsitsyna _Stiltsoft_
Atlassian Partner
April 21, 2025

Hi Justin,

Are solutions that involve apps up for your consideration?

It is possible to get the age of a pull request with the REST API provided by the Awesome Graphs for Bitbucket app.

pull requests.png

Pull request data that you can get with Export to CSV and Awesome Graphs REST API contains the information on the creation date for each pull request and can help you track how long a pull request was open.

Cycle Time information, along with its phases, is also available, in case you would like to explore it in more detail.

Let me know if you have any questions.

Best regards,
Vlada at Awesome Graphs team

Justin Hunt April 21, 2025

Hi! Thank you for your response.... This looks great, but unfortunately we are looking for something non app related.  Is there a way to get info for example from an api call?  Thanks you!

Uladzislava Kastsitsyna _Stiltsoft_
Atlassian Partner
April 22, 2025

Hi Justin,

I am glad to hear that you like our solution. We also understand that purchasing an app might not be possible for every team. It seems that one workaround has already been suggested here. Still, if you ever decide to proceed with the REST API specifically, you can always generate a free trial for Awesome Graphs to evaluate the fit for your case.

Kind regards,
Vlada

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events