-
Notifications
You must be signed in to change notification settings - Fork 608
Guard PR data #1127
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
Guard PR data #1127
Conversation
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.
Makes sense, small change request
@@ -221,6 +221,13 @@ export class GitHubRepository implements IGitHubRepository, vscode.Disposable { | |||
}); | |||
|
|||
const hasMorePages = !!result.headers.link && result.headers.link.indexOf('rel="next"') > -1; | |||
if (!result.data) { |
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.
It feels like a nit pick, but since this is a scenario we can't identify, i think we should log a warning and leave a comment in the code stating why, link to the issue or something.
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.
Done, PTAL.
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.
LGTM.
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.
Looking good
This addresses the error seen by users in #574. I don't know that it'll address the underlying problem, which is that
result
should always return data, but perhaps it'll stop masking it.