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 auth issues with Installation.get_repos
#2547
Fix auth issues with Installation.get_repos
#2547
Conversation
c100916
to
54442e2
Compare
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #2547 +/- ##
==========================================
+ Coverage 98.45% 98.49% +0.04%
==========================================
Files 124 124
Lines 12407 12417 +10
==========================================
+ Hits 12215 12230 +15
+ Misses 192 187 -5
☔ View full report in Codecov by Sentry. |
54442e2
to
840b4d7
Compare
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.
Going to be completely honest, I don't know anything about installations, so I'm going to have to trust you on this one
|
||
auth = self._requester.auth if self._requester is not None else None | ||
# Usually, an Installation is created from a Requester with App authentication | ||
if isinstance(auth, AppAuth): |
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.
What if it's not? Or there is no Auth? Can you have anonymous access to an installation?
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.
The auth
should neither be None
nor not of type AppAuth
, but just in case it is, I don't want to change existing behaviour of user code, which should see an error response by the API.
Maybe there is a valid code path that creates an Installation without auth, because it never uses the requester.
840b4d7
to
e1754e2
Compare
Fixes #2504.