@@ -31,7 +31,6 @@ import { Authorizer, SYSTEM_USER } from "../authorization/authorizer";
31
31
import { TransactionalContext } from "@gitpod/gitpod-db/lib/typeorm/transactional-db-impl" ;
32
32
import { ScmService } from "./scm-service" ;
33
33
import { daysBefore , isDateSmaller } from "@gitpod/gitpod-protocol/lib/util/timeutil" ;
34
- import { TrustedValue } from "@gitpod/gitpod-protocol/lib/util/scrubbing" ;
35
34
36
35
@injectable ( )
37
36
export class ProjectsService {
@@ -58,7 +57,7 @@ export class ProjectsService {
58
57
await this . auth . checkPermissionOnOrganization ( userId , "read_info" , orgId ) ;
59
58
const projects = await this . projectDB . findProjects ( orgId ) ;
60
59
const filteredProjects = await this . filterByReadAccess ( userId , projects ) ;
61
- return Promise . all ( filteredProjects . map ( this . migratePrebuildSettingsOnDemand ) ) ;
60
+ return Promise . all ( filteredProjects . map ( ( p ) => this . migratePrebuildSettingsOnDemand ( p ) ) ) ;
62
61
}
63
62
64
63
async findProjects (
@@ -82,7 +81,7 @@ export class ProjectsService {
82
81
const total = projects . total ;
83
82
return {
84
83
total,
85
- rows : await Promise . all ( rows . map ( this . migratePrebuildSettingsOnDemand ) ) ,
84
+ rows : await Promise . all ( rows . map ( ( p ) => this . migratePrebuildSettingsOnDemand ( p ) ) ) ,
86
85
} ;
87
86
}
88
87
@@ -112,7 +111,7 @@ export class ProjectsService {
112
111
result . push ( project ) ;
113
112
}
114
113
}
115
- return Promise . all ( result . map ( this . migratePrebuildSettingsOnDemand ) ) ;
114
+ return Promise . all ( result . map ( ( p ) => this . migratePrebuildSettingsOnDemand ( p ) ) ) ;
116
115
}
117
116
118
117
async markActive (
@@ -468,9 +467,8 @@ export class ProjectsService {
468
467
469
468
return project ;
470
469
} catch ( error ) {
471
- log . error ( "Prebuild settings migration failed: " + error , {
470
+ log . error ( "Prebuild settings migration failed" , error , {
472
471
projectId : project . id ,
473
- error : new TrustedValue ( error ) ,
474
472
} ) ;
475
473
return project ;
476
474
}
0 commit comments