@@ -101,14 +101,16 @@ export async function runInCI(
101
101
return { mode : 'standalone' , artifacts, newIssues } ;
102
102
}
103
103
104
- // eslint-disable-next-line max-lines-per-function
105
- async function runOnProject ( args : {
104
+ type RunOnProjectArgs = {
106
105
project : ProjectConfig | null ;
107
106
refs : GitRefs ;
108
107
api : ProviderAPIClient ;
109
108
settings : Settings ;
110
109
git : SimpleGit ;
111
- } ) : Promise < ProjectRunResult > {
110
+ } ;
111
+
112
+ // eslint-disable-next-line max-lines-per-function
113
+ async function runOnProject ( args : RunOnProjectArgs ) : Promise < ProjectRunResult > {
112
114
const {
113
115
project,
114
116
refs : { head, base } ,
@@ -188,18 +190,24 @@ async function runOnProject(args: {
188
190
return { ...diffOutput , newIssues } ;
189
191
}
190
192
191
- async function collectPreviousReport ( args : {
192
- project : ProjectConfig | null ;
193
+ type CollectPreviousReportArgs = RunOnProjectArgs & {
193
194
base : GitBranch ;
194
- api : ProviderAPIClient ;
195
- settings : Settings ;
196
195
ctx : CommandContext ;
197
- git : SimpleGit ;
198
- } ) : Promise < string | null > {
196
+ } ;
197
+
198
+ async function collectPreviousReport (
199
+ args : CollectPreviousReportArgs ,
200
+ ) : Promise < string | null > {
199
201
const { project, base, api, settings, ctx, git } = args ;
200
202
const logger = settings . logger ;
201
203
202
- const cachedBaseReport = await api . downloadReportArtifact ?.( project ?. name ) ;
204
+ const cachedBaseReport = await api
205
+ . downloadReportArtifact ?.( project ?. name )
206
+ . catch ( ( error : unknown ) => {
207
+ logger . warn (
208
+ `Error when downloading previous report artifact, skipping - ${ stringifyError ( error ) } ` ,
209
+ ) ;
210
+ } ) ;
203
211
if ( api . downloadReportArtifact != null ) {
204
212
logger . info (
205
213
`Previous report artifact ${ cachedBaseReport ? 'found' : 'not found' } ` ,
0 commit comments