I’ve configured monorepo for the GitHub repository with 3 different analyses.
Everything works fine, the PR is decorated by 3 analyses, status checks fail if the quality gate is not passed.
But I need to make these quality checks mandatory.
So in GitHub, I go to settings->branchs->edit_master->select Sonar Code Analysis (see attached pic). When I click save, GitHub fails with error 500. This happens only and only when I choose one of (or any combination of) Sonar Code Analysis checks. If I select any other check everything works fine. I tried to change the name of my sonar projects but with no luck.
Note.
Before this, I have only one sonar analysis on the same repo and the required status check worked just fine.
The problem arose when I added two other analyses to my repo.
Thanks for contacting us about this. Our engineering team has recently identified a bug, where statuses are allowed to contain square brackets ( [ and ] ), but these can’t be used for branch protection rules. Based on the errors we’re seeing, it appears you may be encountering this bug.
Do the checks you’re trying to add contain square brackets? If so, I recommend creating statuses without square brackets as a workaround, or using the API to update the branch protection settings:
Engineering is still investigating this, but I don’t have a timeline for a fix at the moment. I hope one of those workarounds helps in the meantime, but please let us know if you have any further questions.