-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add commit status GQL type and filtering of commits #593
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. 📢 Thoughts on this report? Let us know! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #593 +/- ##
==========================================
+ Coverage 91.46% 91.49% +0.02%
==========================================
Files 615 615
Lines 16328 16370 +42
==========================================
+ Hits 14935 14977 +42
Misses 1393 1393
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found @@ Coverage Diff @@
## main #593 +/- ##
==========================================
+ Coverage 91.46% 91.49% +0.02%
==========================================
Files 615 615
Lines 16328 16370 +42
==========================================
+ Hits 14935 14977 +42
Misses 1393 1393
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #593 +/- ##
================================================
+ Coverage 95.91000 95.92000 +0.01000
================================================
Files 793 793
Lines 17646 17688 +42
================================================
+ Hits 16926 16968 +42
Misses 720 720
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
graphql_api/actions/commits.py
Outdated
|
||
# Returning commit status in order of priority | ||
# If all are processed -> COMPLETED | ||
if all(state == "processed" for state in upload_states): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could combine this into a single pass if you want, not sure the typical size of states
return_status = CommitStatus.COMPLETED.value
for state in upload_states:
if state == 'error':
has_error = true --> can return early here too
if state == 'uploaded":
has_pending = true
if has_error:
return CommitStatus.ERROR.value
if has_pending:
return CommitStatus.PENDING.value
At the very least, I don't think we need the first check since if any are error or uploaded we return early, and if not we would have gone through the whole list :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it, updated!
closes: codecov/engineering-team#1726
Add a concept of commit status, the difference between this and commit.state is that the value of status examines all the uploads (ie sessions) belonging to the commit, will return:
Also added a filter option
coverageStatus
to Repository.commitsLegal 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.