@@ -53,49 +53,12 @@ export class GithubUtil {
5353 if ( input . annotations . length === 0 ) {
5454 return 0
5555 }
56- // github API lets you post 50 annotations at a time
57- const chunkSize = 50
58- const chunks : Annotations [ ] [ ] = [ ]
59- for ( let i = 0 ; i < input . annotations . length ; i += chunkSize ) {
60- chunks . push ( input . annotations . slice ( i , i + chunkSize ) )
56+ for ( const ann of input . annotations ) {
57+ console . log (
58+ `::warning file=${ ann . path } ,line=${ ann . start_line } ,endLine=${ ann . end_line } ::${ ann . message } `
59+ )
6160 }
62- let lastResponseStatus = 0
63- let checkId
64- for ( let i = 0 ; i < chunks . length ; i ++ ) {
65- let status = 'in_progress'
66- let conclusion = ''
67- if ( i === chunks . length - 1 ) {
68- status = 'completed'
69- conclusion = 'success'
70- }
71- const params = {
72- ...github . context . repo ,
73- name : 'Annotate' ,
74- head_sha : input . referenceCommitHash ,
75- status,
76- ...( conclusion && { conclusion} ) ,
77- output : {
78- title : 'Coverage Tool' ,
79- summary : 'Missing Coverage' ,
80- annotations : chunks [ i ]
81- }
82- }
83- let response
84- if ( i === 0 ) {
85- response = await this . client . rest . checks . create ( {
86- ...params
87- } )
88- checkId = response . data . id
89- } else {
90- response = await this . client . rest . checks . update ( {
91- ...params ,
92- check_run_id : checkId
93- } )
94- }
95- core . info ( response . data . output . annotations_url )
96- lastResponseStatus = response . status
97- }
98- return lastResponseStatus
61+ return 0
9962 }
10063
10164 buildAnnotations (
0 commit comments