在 Bitbucket Server 中,是否可以限制拉取请求以要求它们与目标分支保持同步?

In Bitbucket Server is it possible to restrict pull requests to require them to be up-to-date with the target branch?

我们使用的是使用 git-flow 分支模型的 Bitbucket 服务器。

我已经使用分支限制来禁止推送到 master/develop,除非通过拉取请求。

我现在想添加一个进一步的限制,即 PR 中的合并不能执行,除非它与 develop 分支是最新的。

考虑实施存储库挂钩。

https://developer.atlassian.com/bitbucket/server/docs/latest/how-tos/repository-hooks.html

您可以为拉取请求设置合并策略。仅快进是您想要为您描述的结果启用的那个。

https://confluence.atlassian.com/bitbucketserver/pull-request-merge-strategies-844499235.html