@@ -12,25 +12,25 @@ async function main() {
1212 const baseFile = core . getInput ( "lcov-base" )
1313 const updateComment = core . getBooleanInput ( "update-comment" )
1414
15- console . log ( "=============================" )
16- console . log ( "UPDATE COMMENT" , updateComment )
17- console . log ( "=============================" )
15+ core . info ( "=============================" )
16+ core . info ( "UPDATE COMMENT" , updateComment )
17+ core . info ( "=============================" )
1818
1919 const raw = await fs . readFile ( lcovFile , "utf-8" ) . catch ( err => null )
2020 if ( ! raw ) {
21- console . log ( `No coverage report found at '${ lcovFile } ', exiting...` )
21+ core . info ( `No coverage report found at '${ lcovFile } ', exiting...` )
2222 return
2323 }
2424
2525 const baseRaw =
2626 baseFile && ( await fs . readFile ( baseFile , "utf-8" ) . catch ( err => null ) )
2727 if ( baseFile && ! baseRaw ) {
28- console . log ( `No coverage report found at '${ baseFile } ', ignoring...` )
28+ core . info ( `No coverage report found at '${ baseFile } ', ignoring...` )
2929 }
3030
3131 const isPullRequest = Boolean ( context . payload . pull_request )
3232 if ( ! isPullRequest ) {
33- console . log ( "Not a pull request, skipping..." )
33+ core . info ( "Not a pull request, skipping..." )
3434 return
3535 }
3636
@@ -50,9 +50,9 @@ async function main() {
5050 const githubClient = new GitHub ( token )
5151
5252 const createGitHubComment = ( ) => {
53- console . log ( "=============================" )
54- console . log ( "CREATE GITHUB COMMENT" )
55- console . log ( "=============================" )
53+ core . info ( "=============================" )
54+ core . info ( "CREATE GITHUB COMMENT" )
55+ core . info ( "=============================" )
5656
5757 return githubClient . issues . createComment ( {
5858 repo : context . repo . repo ,
@@ -63,9 +63,9 @@ async function main() {
6363 }
6464
6565 const updateGitHubComment = commentId => {
66- console . log ( "=============================" )
67- console . log ( "UPDATE GITHUB COMMENT" )
68- console . log ( "=============================" )
66+ core . info ( "=============================" )
67+ core . info ( "UPDATE GITHUB COMMENT" )
68+ core . info ( "=============================" )
6969
7070 return githubClient . issues . updateComment ( {
7171 repo : context . repo . repo ,
@@ -76,9 +76,9 @@ async function main() {
7676 }
7777
7878 if ( updateComment ) {
79- console . log ( "=============================" )
80- console . log ( "UPDATE COMMENT TRUE" )
81- console . log ( "=============================" )
79+ core . info ( "=============================" )
80+ core . info ( "UPDATE COMMENT TRUE" )
81+ core . info ( "=============================" )
8282
8383 const issueComments = await githubClient . issues . listComments ( {
8484 repo : context . repo . repo ,
@@ -91,23 +91,23 @@ async function main() {
9191 )
9292
9393 if ( existingComment ) {
94- console . log ( "=============================" )
95- console . log ( "HAS EXISTING COMMENT" )
96- console . log ( "=============================" )
94+ core . info ( "=============================" )
95+ core . info ( "HAS EXISTING COMMENT" )
96+ core . info ( "=============================" )
9797
9898 await updateGitHubComment ( existingComment . id )
9999 return
100100 }
101101 }
102102
103- console . log ( "=============================" )
104- console . log ( "CREATING COMMENT" )
105- console . log ( "=============================" )
103+ core . info ( "=============================" )
104+ core . info ( "CREATING COMMENT" )
105+ core . info ( "=============================" )
106106
107107 await createGitHubComment ( )
108108}
109109
110110export default main ( ) . catch ( function ( err ) {
111- console . log ( err )
111+ core . info ( err )
112112 core . setFailed ( err . message )
113113} )
0 commit comments