-
Notifications
You must be signed in to change notification settings - Fork 407
Fixed error that happened to try get user information without user scope #911
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
Conversation
@sigmavirus24 Please merge this. Thank you @mtb-beta |
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.
Got the issue, tried the patch: works like a charm. Thanks :)
self.owned_private_repos_count = user["owned_private_repos"] | ||
self.total_private_repos_count = user["total_private_repos"] | ||
self.plan = user.get("plan") | ||
user_can_be_see = { |
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.
you mean "seen"?
Any updates as to when this might be merged? I'm on version 1.2.0 and I'm seeing this issue---would be great to have a fix soon. |
I was wondering whether this fix can be included in the next release if time permits, since this issue requires downgrading to 0.9.6 for some use cases. Thanks. |
@sigmavirus24 any chance to see this merged? |
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.
Made some suggestions, but I think I messed up the merge comment I made earlier. Going to try sorting it out.
self.owned_private_repos_count = user["owned_private_repos"] | ||
self.total_private_repos_count = user["total_private_repos"] | ||
self.plan = user.get("plan") | ||
user_can_be_see = { |
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.
user_can_be_see = { | |
user_can_be_seen = { |
"total_private_repos_count": None, | ||
"plan": None, | ||
} | ||
user_can_be_see.update(user) |
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.
user_can_be_see.update(user) | |
user_can_be_seen.update(user) |
self.disk_usage = user_can_be_see["disk_usage"] | ||
self.owned_private_repos_count = user_can_be_see[ | ||
"owned_private_repos_count" | ||
] | ||
self.total_private_repos_count = user_can_be_see[ | ||
"total_private_repos_count" | ||
] | ||
self.plan = user_can_be_see.get("plan") |
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.
self.disk_usage = user_can_be_see["disk_usage"] | |
self.owned_private_repos_count = user_can_be_see[ | |
"owned_private_repos_count" | |
] | |
self.total_private_repos_count = user_can_be_see[ | |
"total_private_repos_count" | |
] | |
self.plan = user_can_be_see.get("plan") | |
self.disk_usage = user_can_be_seen["disk_usage"] | |
self.owned_private_repos_count = user_can_be_seen[ | |
"owned_private_repos_count" | |
] | |
self.total_private_repos_count = user_can_be_seen[ | |
"total_private_repos_count" | |
] | |
self.plan = user_can_be_seen.get("plan") |
Ah, the status test was removed upstream after this PR was opened. Needs another commit to drop that test out. |
Bad merge commit
Actually I think this should simply be closed as a dupe of #992 which has a bit cleaner of an approach. I appreciate the work you did on this though! |
I created the fix for issue #797.
Review please.
Thank you.