@@ -34,11 +34,11 @@ export async function run(
3434 let commentMdPath : string | undefined
3535
3636 if ( inputs . monorepo ) {
37- core . debug ( 'Running Code PushUp in monorepo mode' )
37+ core . info ( 'Running Code PushUp in monorepo mode' )
3838 const projects = await listMonorepoProjects ( inputs )
3939 const diffJsonPaths : string [ ] = [ ]
4040 for ( const project of projects ) {
41- core . debug ( `Running Code PushUp on monorepo project ${ project . name } ` )
41+ core . info ( `Running Code PushUp on monorepo project ${ project . name } ` )
4242 const comparisonFiles = await runOnProject (
4343 project ,
4444 inputs ,
@@ -67,7 +67,7 @@ export async function run(
6767 core . debug ( `Uploaded report diff artifact (${ size } bytes)` )
6868 }
6969 } else {
70- core . debug ( 'Running Code PushUp in standalone project mode' )
70+ core . info ( 'Running Code PushUp in standalone project mode' )
7171 const comparisonFiles = await runOnProject ( null , inputs , artifact , git )
7272 if ( comparisonFiles ) {
7373 commentMdPath = comparisonFiles . mdFilePath
@@ -77,7 +77,7 @@ export async function run(
7777 if ( commentMdPath ) {
7878 const commentId = await commentOnPR ( commentMdPath , inputs )
7979 core . setOutput ( 'comment-id' , commentId )
80- core . debug ( `Commented on PR #${ github . context . issue . number } ` )
80+ core . info ( `Commented on PR #${ github . context . issue . number } ` )
8181 }
8282 } catch ( error ) {
8383 core . setFailed ( error instanceof Error ? error . message : `${ error } ` )
@@ -115,33 +115,39 @@ async function runOnProject(
115115 }
116116
117117 const { base } = github . context . payload . pull_request
118- core . debug ( `PR detected, preparing to compare base branch ${ base . ref } ` )
118+ core . info ( `PR detected, preparing to compare base branch ${ base . ref } ` )
119119
120120 let prevReport : string
121121
122122 let cachedBaseReport : PersistedCliFiles | null = null
123123 if ( inputs . artifacts ) {
124124 cachedBaseReport = await downloadReportArtifact ( artifact , base , inputs )
125- core . debug (
126- `Previous report artifact ${ cachedBaseReport ? ` found and downloaded to ${ cachedBaseReport . jsonFilePath } ` : ` not found` } `
125+ core . info (
126+ `Previous report artifact ${ cachedBaseReport ? ' found' : ' not found' } `
127127 )
128+ if ( cachedBaseReport ) {
129+ core . debug (
130+ `Previous report artifact downloaded to ${ cachedBaseReport . jsonFilePath } `
131+ )
132+ }
128133 }
129134
130135 if ( cachedBaseReport ) {
131136 prevReport = await fs . readFile ( cachedBaseReport . jsonFilePath , 'utf8' )
132137 } else {
133138 await git . fetch ( 'origin' , base . ref , [ '--depth=1' ] )
134139 await git . checkout ( [ '-f' , base . ref ] )
135- core . debug ( `Switched to base branch ${ base . ref } ` )
140+ core . info ( `Switched to base branch ${ base . ref } ` )
136141
137142 try {
138- await printConfig ( ctx )
143+ await printConfig ( { ... ctx , silent : ! core . isDebug ( ) } )
139144 core . debug (
140145 `Executing print-config verified code-pushup installed in base branch ${ base . ref } `
141146 )
142147 } catch ( err ) {
143- core . debug (
144- `Executing print-config failed, assuming code-pushup not installed in base branch ${ base . ref } and skipping comparison - ${ err } `
148+ core . debug ( `Error from print-config - ${ err } ` )
149+ core . info (
150+ `Executing print-config failed, assuming code-pushup not installed in base branch ${ base . ref } and skipping comparison`
145151 )
146152 return null
147153 }
@@ -151,7 +157,7 @@ async function runOnProject(
151157 core . debug ( `Collected previous report at ${ prevReportPath } ` )
152158
153159 await git . checkout ( [ '-f' , '-' ] )
154- core . debug ( 'Switched back to current branch' )
160+ core . info ( 'Switched back to PR branch' )
155161 }
156162
157163 const reportsDir = path . join ( inputs . directory , '.code-pushup' )
@@ -165,8 +171,9 @@ async function runOnProject(
165171 { before : prevPath , after : currPath , label : project ?. name } ,
166172 ctx
167173 )
174+ core . info ( 'Compared reports and generated diff files' )
168175 core . debug (
169- `Compared reports and generated diff at ${ comparisonFiles . jsonFilePath } and ${ comparisonFiles . mdFilePath } `
176+ `Generated diff files at ${ comparisonFiles . jsonFilePath } and ${ comparisonFiles . mdFilePath } `
170177 )
171178
172179 if ( inputs . annotations ) {
0 commit comments