-
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
feat: Add an endpoint to get all uploads of a given commit (#112 internal) #260
Conversation
@@ -47,3 +53,39 @@ class CommitDetailSerializer(CommitSerializer): | |||
class Meta: | |||
model = Commit | |||
fields = CommitSerializer.Meta.fields + ("report",) | |||
|
|||
|
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.
A subset of fields of the ReportSession
model, matching the contents of old v1 sessions endpoint, except keys are descriptive instead of single letters from before.
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #260 +/- ##
==========================================
+ Coverage 95.62% 95.63% +0.01%
==========================================
Files 607 607
Lines 15600 15641 +41
==========================================
+ Hits 14917 14958 +41
Misses 683 683
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #260 +/- ##
=======================================
+ Coverage 95.53 95.54 +0.01
=======================================
Files 721 721
Lines 16007 16048 +41
=======================================
+ Hits 15291 15332 +41
Misses 716 716
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -68,6 +71,10 @@ def get_complexity_ratio(self, totals) -> float: | |||
) | |||
|
|||
|
|||
class UploadTotalsSerializer(BaseTotalsSerializer): |
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.
Do we need this?
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.
Technically no, but I just do this to be more explicit about it. And BaseTotalsSerializer
acts as a ABC even though it is not
Purpose/Motivation
What is the feature? Why is this being done?
Adds a new endpoint (
/api/v2/{service}/{owner_username}/repos/{repo_name}/commits/{commitsha}/uploads
) to return list of uploads for a given commit report by the commit SHA.Links to relevant tickets
https://github.com/codecov/internal-issues/issues/112
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.