-
Notifications
You must be signed in to change notification settings - Fork 3
Add a new GraphQL mutation to sync with app token #202
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
base: main
Are you sure you want to change the base?
Conversation
This change makes the sync task use an app token rather than the user's token. It's a separate mutation, so it shouldn't conflict with the existing sync trigger.
Sentry detected 4 potential issues in your recent changesSuspicion: The `syncRepos` mutation skips authentication validation but still accesses `self.current_owner`, potentially causing an `AttributeError` for unauthenticated users.
The `syncRepos` GraphQL resolver uses an error handling decorator that does not catch built-in Python exceptions, risking unhandled `KeyError` or `AttributeError` if context access or method calls fail.
Suspicion of an `AttributeError` in the new `syncRepos` mutation when `self.current_owner` is `None`, potentially causing unexpected behavior due to bypassed validation.
A type annotation change for the token refresh callback suggests a potential mismatch where a dictionary might be passed when an `OauthConsumerToken` is expected, risking runtime errors like `AttributeError` or `KeyError`.
Did you find this useful? React with a 👍 or 👎 |
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #202 +/- ##
==========================================
- Coverage 94.20% 94.19% -0.01%
==========================================
Files 1203 1205 +2
Lines 44991 45006 +15
Branches 1431 1431
==========================================
+ Hits 42383 42395 +12
- Misses 2305 2308 +3
Partials 303 303
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
📢 Thoughts on this report? Let us know! |
This change makes the sync task use an app token rather than the user's token. It's a separate mutation, so it shouldn't conflict with the existing sync trigger.