Quality Gate Not computed for main branch

Hi, I’m new to Sonar Cloud. We been observing that Quality Gates are “Not computed” on main branch of our project. New Code Condition has been set for the organization to 30 days. New Analysis are observed for the main branch commits (via PR) in activity logs. I can see the computing is working for PR requests, just not the main branch. Any pointer would be greatly helpful. Thanks!

New Code

Hi,

Welcome to the community!

How about a screenshot of your project’s New Code page (Administration → New code)?

 
Ann

Thanks Ann,

I updated the original post above with the Administration → New Code page.

I notice the (i) icon saying only new projects will be affected. Couple of of the projects were created when no options were selected, but even the newer project after the “Number of days” options have been configure is not computing the quality gates on the main branch.

Mike

Hi Mike,

Can you double-check what’s set at the project level for that project? Or is that the screenshot you added?

 
Ann

So they were not set at the project level. I’ve gone ahead and set it for one of the project. However, that project just did a PR merge from a feature branch into the main branch. The PR had a passing QG compute, but nothing computed for main branch still.

Does it require a direct commit to the main branch?

Hi,

I’d count a PR merge as a direct commit.

Just to ask the stupid question: the main branch was reanalyzed after the merge, right? And just to make sure, could you do one more analysis (so a total of 2 after the project-level value was set)?

 
Ann