feat: Add query convenience function#92174
Merged
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #92174 +/- ##
==========================================
- Coverage 87.91% 87.90% -0.01%
==========================================
Files 10214 10175 -39
Lines 585330 584386 -944
Branches 22703 22574 -129
==========================================
- Hits 514602 513733 -869
+ Misses 70306 70208 -98
- Partials 422 445 +23 |
| } | ||
|
|
||
| return self.post( | ||
| "/graphql/sentry/gh", |
Contributor
There was a problem hiding this comment.
Optional: would it make sense to have gh/token still variables (maybe even properties of the client?) and have those default to gh/github-token?
Contributor
Author
There was a problem hiding this comment.
Yeah I like that! I can make the change
adrianviquez
approved these changes
May 27, 2025
8c6d2be to
4c3f7a9
Compare
andrewshie-sentry
pushed a commit
that referenced
this pull request
Jun 2, 2025
This PR adds a new function to the Codecovclient which will make it a lot easier to do graphql requests in other parts of the map. It basically just packages everything we need into a single function so all we need to do is pass in a query and the variables into a function everywhere else. I hardcoded the URL and the token type because we only need to support Github for now. <!-- Sentry employees and contractors can delete or ignore the following. --> ### 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. and is gonna need some rights from me in order to utilize my contributions in this here 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. --------- Co-authored-by: Matt Hammerly <matt.hammerly@sentry.io> Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new function to the Codecovclient which will make it a lot easier to do graphql requests in other parts of the map. It basically just packages everything we need into a single function so all we need to do is pass in a query and the variables into a function everywhere else.
I hardcoded the URL and the token type because we only need to support Github for now.
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. and is gonna need some rights from me in order to utilize my contributions in this here 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.