0

I've enjoyed using the Branch Protection options that GitHub offers. The one at the center of this question is the feature of requiring a status check prior to passing:

Branch Protection

This works great for repositories that have a single project: For a given branch (say develop) to be merged into, choose a build from TeamCity that requires passage for a given Pull Request before letting it in.

My current conundrum is that I have a repository that consists of multiple projects on my plate now. I've configured TeamCity to have separate build configurations for each one easily enough, giving me access to Foo PR Build, Bar PR Build, etc.

Is there a way I can make GitHub differentiate between these, for the purposes of branch protection? Examples like "When Project Foo has a PR, then GitHub should check the Foo PR Build branch for status in order to allow this PR to get merged into develop" are what I'm after here. The goal is to have a single develop branch for all these projects under the same repository, so creating a separate develop branch for each project is out of the question.

Doctor Blue
  • 3,769
  • 6
  • 40
  • 63
  • 1
    My first gut-reaction to this is to NOT have them in the same project, but use submodules for the code that each project is relying on. Here is some [supporting documentation][1] that might help you. Pay particular attention to the answer marked as correct. [1]: https://stackoverflow.com/questions/5514739/best-practice-for-git-repositories-with-multiple-projects-in-traditional-n-tier?rq=1 – Bryce Drew Sep 20 '19 at 20:08
  • @BryceDrew indeed, that's the setup that is current. Some experimentation is happening in this regard to see if a single repo can be made possible. I'll give that other thread a read! – Doctor Blue Sep 23 '19 at 16:10

0 Answers0