Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: filter deleted/private repos out of results to graphql queries #307

Merged
merged 4 commits into from
Jan 4, 2024

Conversation

matt-codecov
Copy link
Contributor

@matt-codecov matt-codecov commented Dec 13, 2023

closes https://github.com/codecov/internal-issues/issues/131

old logic amounted to:

filters = (repo.private = False and (not repo.deleted = True))
          or repo.ownerid = owner.ownerid
          or repo.repoid in owner.permissions

the private/deleted check is ignored if either of the owner-related predicates are true. that's fine for the private condition, but we want to apply the deleted condition unconditionally. new logic:

filters = (repo.private = False or repo.ownerid = owner.ownerid or repo.repoid in owner.permissions)
          and (not repo.deleted = True)

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bdcf0f0) 95.63% compared to head (28bd467) 95.63%.

❗ Current head 28bd467 differs from pull request most recent head 9d0ddd1. Consider uploading reports for the commit 9d0ddd1 to get more accurate results

Changes have been made to critical files, which contain lines commonly executed in production. Learn more

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #307   +/-   ##
=====================================
  Coverage   95.63   95.63           
=====================================
  Files        730     730           
  Lines      16454   16432   -22     
=====================================
- Hits       15735   15714   -21     
+ Misses       719     718    -1     
Flag Coverage Δ
unit 96.01% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 96.01% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matt-codecov matt-codecov marked this pull request as ready for review December 15, 2023 21:18
@codecov-staging
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bdcf0f0) 96.01% compared to head (28bd467) 96.01%.

❗ Current head 28bd467 differs from pull request most recent head 9d0ddd1. Consider uploading reports for the commit 9d0ddd1 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #307   +/-   ##
=======================================
  Coverage   96.01%   96.01%           
=======================================
  Files         615      615           
  Lines       15943    15921   -22     
=======================================
- Hits        15307    15286   -21     
+ Misses        636      635    -1     
Flag Coverage Δ
unit 96.01% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 96.01% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codecov-public-qa bot commented Dec 15, 2023

Codecov Report

Merging #307 (9d0ddd1) into main (bdcf0f0) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #307   +/-   ##
=======================================
  Coverage   96.01%   96.01%           
=======================================
  Files         615      615           
  Lines       15943    15944    +1     
=======================================
+ Hits        15307    15308    +1     
  Misses        636      636           
Flag Coverage Δ
unit 96.01% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 96.01% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
core/managers.py 100.00% <100.00%> (ø)

Impacted file tree graph

@matt-codecov matt-codecov merged commit c6f2848 into main Jan 4, 2024
13 of 14 checks passed
@matt-codecov matt-codecov deleted the matt/fix-repo-filters branch January 4, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants