Bitbucket管道允许定义对拉取请求的检查,并具有全局过滤器,可以检查源分支。
pipelines:
pull-requests:
'**': #this runs as default for any branch not elsewhere defined
- step:
script
- ...
feature/*: #any branch with a feature prefix
- step:
script:
- ...
Run Code Online (Sandbox Code Playgroud)
如何根据目标分支进行过滤?只有合并到母版中时,才需要执行一些测试。