Hi folks,
I know how to get the number of open pull requests in either Bitbucket Cloud or Bitbucket Server, using GET API. I would like to know if it is possible to get the number of open pull requests beyond a particular time. For example, the number of open pull requests older than today, or older than 24 hr,etc. Is this possible?
Thank you.
Hello @Alfred ,
In Bitbucket Cloud the query would be something like this:
created_on < "2019-01-01T00:00:00.00" AND state="OPEN"
For example, all open pull requests created before 2019:
To just count such PRs you can filter the response down to only size property:
As for Bitbucket Server, it looks like there's no way to filter by creation date, unfortunately. You can work around this by doing calculations on the client side since the PRs can be ordered by creation date, both ascending and descending.
Hope this helps.
Cheers,
Daniil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.