Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,18 @@
info = ratelimit( response.headers );
debug( 'Rate limit: %d', info.limit );
debug( 'Rate limit remaining: %d', info.remaining );
debug( 'Rate limit reset: %s', (new Date( info.reset*1000 )).toISOString() );

if ( typeof info.reset === 'number' ) {
var resetTime = new Date( info.reset * 1000 );

Check failure on line 88 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

All 'var' declarations must be at the top of the function scope

Check failure on line 88 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Move variable declaration to function body root
var time = resetTime.getTime();

Check failure on line 89 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

All 'var' declarations must be at the top of the function scope

Check failure on line 89 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Move variable declaration to function body root

debug(

Check failure on line 91 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected newline after '('
'Rate limit reset: %s',

Check failure on line 92 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

There should be no line break here
isNaN( time ) ? 'invalid timestamp' : resetTime.toISOString()

Check failure on line 93 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

parentheses required around ternary conditions
);

Check failure on line 94 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected newline before ')'

Check failure on line 94 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Expected indentation of 3 tabs but found 4
} else {

Check failure on line 95 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Expected indentation of 2 tabs but found 3
debug( 'Rate limit reset: not provided' );
}

if ( error ) {
return clbk( error, info );
Expand Down