My organization uses Stash v3.11.1 and the plugin Adaptavist ScriptRunner. An issue has recently come up where we want to prevent the user from creating pull requests between certain branches with a given prefix.
For example we want to block any branch with the prefix "team/" from being able to be merged into a branch that is prefixed with "release/"
team/a_team_branch ---> release/v1.0 would be blocked and pull request not created
bugfix/a_users_bugfix_branch ---> release/v1.0 a pull request could be created
How would I go about doing this with ScriptRunner?