# Github Status Check

**URL:** <https://community.sonarsource.com/t/github-status-check/45957>\
**Category:** SonarQube Cloud\
**Tags:** sonarqube-cloud\
**Created:** [July 6, 2021, 4:06am UTC](https://community.sonarsource.com/t/github-status-check/45957 "2021-07-06T04:06:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![benzid-wael](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/benzid-wael/32/23691_2.png) [@benzid-wael](https://community.sonarsource.com/u/benzid-wael)\
**Post date:** [July 6, 2021, 4:06am UTC](https://community.sonarsource.com/t/github-status-check/45957/1 "2021-07-06T04:06:16Z")

</div>

I’m trying to block merging PRs if code coverage drops under a specific threshold, let’s say 80% for now  
I created a quality gate for this and added the repositories to which it should apply  
I created a new PR where I deleted all unit tests. In SonarSource, I can see that it detects that the coverage is ZERO now. But still, merging in Github is still possible

Please note that I already created a branch protection rule and made " SonarCloud Code Analysis " status check required

Can you please tell me what I’m missing here?

Template for a good new topic, formatted with [Markdown](https://commonmark.org/help/):

- ALM used: GitHub
- CI system used: Github Actions
- Languages of the repository: Go
- Only if the SonarCloud project is public, the URL
  - [GitHub - benzid-wael/mytasks: Tasks, boards & notes manager](https://github.com/benzid-wael/mytasks/)
  - [Bad PR. Please dod not merge it! by benzid-wael · Pull Request #5 · benzid-wael/mytasks · GitHub](https://github.com/benzid-wael/mytasks/pull/5)

---

<div class="post-metadata">

**Author:** ![AlxO](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alxo/32/3225_2.png) [@AlxO](https://community.sonarsource.com/u/AlxO)\
**Post date:** [July 8, 2021, 2:50pm UTC](https://community.sonarsource.com/t/github-status-check/45957/5 "2021-07-08T14:50:13Z")

</div>

Hi @benzid-wael, welcome and thanks for posting to the community!

I reviewed your project and found the following:

- PR #5 captured a 0% coverage, however it bears the warning “Some Quality Gate conditions on New Code were ignored because of the small number of New Lines”. Indeed 4 lines got changed only so it is a likely cause for not impacting the code coverage

- PR #6 comes with no code coverage data being provided “No data yet”. I guess this relates to your test whereby all unit tests were removed.

I believe that your configuration is correct, however requires a more substantial pull request to see the benefits.

Let me know if that helps!

Regards,  
@AlxO

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [July 19, 2021, 2:43pm UTC](https://community.sonarsource.com/t/github-status-check/45957/6 "2021-07-19T14:43:48Z")

</div>

Closed on July 19, 2021, 2:43pm UTC

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