ITADN

Build all branches and PRs without duplicate jobs?

#517Openanna-oake 创建于 2025-09-29
A
anna-oakecommented
I have buildbot-nix configured like this: ```nix services.buildbot-nix.master.branches = { all-branches = { matchGlob = "*"; registerGCRoots = false; }; }; ``` My goal is to build all branches and all pull requests in my repository. The configuration above enables that, however each commit in pull requests is built twice. If i just push a commit to the branch A or the branch B, a single build job is spawned from the `push` event. However, if there is an open pull request to merge B into A, each new commit in the branch B would trigger **two** build jobs via the `pull_request` event. These two jobs would race each other, would lock one another, and would eventually complete with the same result (obviously, since the same commit is being built). It's not the end of the world, but it slows things down and wastes resources. Is there a way to avoid such job duplication while still building all branches? Am I misconfiguring my instance? Thank you!!
2 条评论