Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Grdowns/update channel4#2576

Merged
bobbrow merged 9 commits into
mastermicrosoft/vscode-cpptools:masterfrom
grdowns/update-channel4microsoft/vscode-cpptools:grdowns/update-channel4Copy head branch name to clipboard
Oct 2, 2018
Merged

Grdowns/update channel4#2576
bobbrow merged 9 commits into
mastermicrosoft/vscode-cpptools:masterfrom
grdowns/update-channel4microsoft/vscode-cpptools:grdowns/update-channel4Copy head branch name to clipboard

Conversation

@grdowns

@grdowns grdowns commented Sep 28, 2018

Copy link
Copy Markdown
Contributor

Remove redundant telemetry on failure
Check GitHub API rate limit prior to attempting to download release
Update error message for failing to parse release JSON into type Build[]

Comment thread Extension/src/githubAPI.ts Outdated
}

function isRateLimit(input: any): input is RateLimit {
return input && input.rate && isRate(input.rate);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: checking input.rate here should be unnecessary (isRate will do it)

Comment thread Extension/src/githubAPI.ts Outdated
}

function isRate(input: any): input is Rate {
return input && input.remaining && typeof(input.remaining) === 'number';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think Sean added a util.isNumber function.

Comment thread Extension/src/githubAPI.ts
Comment thread Extension/src/githubAPI.ts Outdated

async function rateLimitExceeded(): Promise<boolean> {
const rateLimit: RateLimit = await getRateLimit();
if (rateLimit.rate.remaining <= 0) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is an async function using await. You should be able to just return rateLimit.rate.remaining here.

Comment thread Extension/src/githubAPI.ts Outdated
}

async function getRateLimit(): Promise<RateLimit> {
const header: OutgoingHttpHeaders = { 'User-Agent': 'vscode-cpptools' };

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

it looks like this is double-indented

Comment thread Extension/src/common.ts
@bobbrow

bobbrow commented Oct 1, 2018

Copy link
Copy Markdown
Member

TSlint: tmp is no longer needed in the githubApi.ts import list

@bobbrow bobbrow merged commit 80716ae into master Oct 2, 2018
@bobbrow bobbrow deleted the grdowns/update-channel4 branch October 2, 2018 17:13
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.