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: Handle no current owner in GraphQL resolvers #21

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

scott-codecov
Copy link
Contributor

@scott-codecov scott-codecov commented Jul 20, 2023

Purpose/Motivation

This could happen if you're logged in as a user who has 1 linked owner on service A and then you try and load a public repo on service B.

Links to relevant tickets

Saw 2 instances of this in Sentry so far: https://codecov.sentry.io/issues/4328543223/

What does this PR do?

Handles no current_owner in the case described above.

This could happen if you're logged in as a user go has 1 linked owner
on service A and then you try and load a public repo on service B.
@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Merging #21 (f3abc18) into main (f081451) will not change coverage.
The diff coverage is 100.00%.

@@          Coverage Diff          @@
##            main     #21   +/-   ##
=====================================
  Coverage   95.23   95.23           
=====================================
  Files        559     559           
  Lines      14025   14030    +5     
=====================================
+ Hits       13356   13361    +5     
  Misses       669     669           
Flag Coverage Δ
unit 95.23% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 95.23% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
.../owner/interactors/get_is_current_user_an_admin.py 96.96% <100.00%> (+0.19%) ⬆️
graphql_api/actions/repository.py 100.00% <100.00%> (ø)
graphql_api/types/owner/owner.py 91.52% <100.00%> (+0.14%) ⬆️

@scott-codecov scott-codecov merged commit 40f152f into main Jul 21, 2023
8 checks passed
@scott-codecov scott-codecov deleted the scott/fix-no-current-owner branch July 21, 2023 13:36
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

2 participants