@@ -321,7 +321,7 @@ const createCheck = async function (octokit, owner, repo, title, ref) {
321
321
repo,
322
322
name : title ,
323
323
head_sha : ref ,
324
- status : 'in_progress' ,
324
+ status : 'in_progress'
325
325
} )
326
326
return checkRunId
327
327
} catch ( err ) {
@@ -365,9 +365,9 @@ const stats = function (annotations) {
365
365
annotations . push ( annotation )
366
366
return acc
367
367
} , { } )
368
- const failureCount = ( annotationsPerLevel [ ' failure' ] || [ ] ) . length || 0
369
- const warningCount = ( annotationsPerLevel [ ' warning' ] || [ ] ) . length || 0
370
- const noticeCount = ( annotationsPerLevel [ ' notice' ] || [ ] ) . length || 0
368
+ const failureCount = ( annotationsPerLevel . failure || [ ] ) . length || 0
369
+ const warningCount = ( annotationsPerLevel . warning || [ ] ) . length || 0
370
+ const noticeCount = ( annotationsPerLevel . notice || [ ] ) . length || 0
371
371
return { failureCount, warningCount, noticeCount }
372
372
}
373
373
@@ -399,15 +399,15 @@ const booleanValue = function (input) {
399
399
return / ^ \s * ( t r u e | 1 ) \s * $ / i. test ( input )
400
400
}
401
401
402
- const readAnnotationsFile = async function ( inputPath ) {
402
+ const readAnnotationsFile = async function ( inputPath ) {
403
403
const ignoreMissingFileValue = Object ( _actions_core__WEBPACK_IMPORTED_MODULE_0__ . getInput ) ( 'ignore-missing-file' , { required : false } ) || 'true'
404
404
const ignoreMissingFile = booleanValue ( ignoreMissingFileValue )
405
405
try {
406
406
const inputContent = await fs__WEBPACK_IMPORTED_MODULE_2__ . promises . readFile ( inputPath , 'utf8' )
407
407
return JSON . parse ( inputContent )
408
408
} catch ( err ) {
409
409
if ( err . code === 'ENOENT' && ignoreMissingFile ) {
410
- Object ( _actions_core__WEBPACK_IMPORTED_MODULE_0__ . info ) ( `Ignoring missing file at '${ inputPath } ' because \ 'ignore-missing-file\ ' is true` )
410
+ Object ( _actions_core__WEBPACK_IMPORTED_MODULE_0__ . info ) ( `Ignoring missing file at '${ inputPath } ' because 'ignore-missing-file' is true` )
411
411
return null
412
412
} else {
413
413
throw err
@@ -421,7 +421,7 @@ async function run () {
421
421
const inputPath = Object ( _actions_core__WEBPACK_IMPORTED_MODULE_0__ . getInput ) ( 'input' , { required : true } )
422
422
const title = Object ( _actions_core__WEBPACK_IMPORTED_MODULE_0__ . getInput ) ( 'title' , { required : false } )
423
423
424
- const octokit = new _actions_github__WEBPACK_IMPORTED_MODULE_1__ . getOctokit ( repoToken )
424
+ const octokit = Object ( _actions_github__WEBPACK_IMPORTED_MODULE_1__ . getOctokit ) ( repoToken )
425
425
const pullRequest = _actions_github__WEBPACK_IMPORTED_MODULE_1__ . context . payload . pull_request
426
426
let ref
427
427
if ( pullRequest ) {
@@ -457,7 +457,7 @@ async function run () {
457
457
start_line : annotation . line ,
458
458
end_line : annotation . line ,
459
459
...annotation ,
460
- annotation_level : annotationLevel ,
460
+ annotation_level : annotationLevel
461
461
}
462
462
} )
463
463
await updateCheck ( octokit , owner , repo , checkRunId , conclusion , title , summary , annotations )
0 commit comments