Cannot make sonarcloud status check required in github

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.

Anyone can help me with this problem?

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.

Greetings @vahagnv

Thanks for the report. I can reproduce this and have reported it.

Apparently this issue is because of “[“ “]” symbols int the checker name.

Check this

https://support.github.com/ticket/personal/0/1407599

Thanks. We don’t have access to that ticket – can you tell us if GitHub intends to fix it? :smiley:

Here is the answer from Github:

Hi,

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.

Apparently there is no estimation on fix)

Hey @vahagnv – just curious, was there any additional follow-up from GitHub?

I was able to set check via GitHub API.

Yesterday I got email from GitHub, they are claiming that this is fixed already.

From GitHub:

Hi,

Thank you for your patience. This should be resolved now. Please let us know if you have any further trouble.

Great news! Thanks for the update. I confirm on my side that I can add the checks through the UI.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.