Skip to content

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

Merged
merged 2 commits into from
Apr 22, 2019
Merged

Guard PR data #1127

merged 2 commits into from
Apr 22, 2019

Conversation

queerviolet
Copy link
Contributor

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.

Copy link
Contributor

@StanleyGoldman StanleyGoldman left a 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) {
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, PTAL.

Copy link
Member

@rebornix rebornix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@StanleyGoldman StanleyGoldman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good

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.

3 participants