We just had a situation where a PR was built and approved 2mo ago but never merged. It was just merged and broke the build. I'd like to just fence out aged PRs, rather than requiring a pre-merge commit hook that fails the build. How can I do this?
ScriptRunner is an app for Bitbucket that allows custom logic.
I am quite sure that you could create a 3-line Groovy script that would do something like this:
// check if the PR is older than 30 days
if((System.currentTimeMillis() - pullRequest.createdDate.time) > 30*24*60*60*1000) {
// ... reject the PR
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.