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 daysif((System.currentTimeMillis() - pullRequest.createdDate.time) > 30*24*60*60*1000) { // ... reject the PR}
It looks like you're new here. Sign in or register to get started.