22 NEXT_SECURITY_RELEASE_REPOSITORY ,
33 checkoutOnSecurityReleaseBranch ,
44 getVulnerabilitiesJSON ,
5+ getVulnerabilitiesJSONPath ,
56 validateDate ,
67 formatDateToYYYYMMDD ,
78 createIssue
@@ -40,20 +41,30 @@ export default class SecurityAnnouncement {
4041 validateDate ( content . releaseDate ) ;
4142 const releaseDate = new Date ( content . releaseDate ) ;
4243
43- await Promise . all ( [
44+ const [ dockerIssue , buildIssue ] = await Promise . all ( [
4445 this . createDockerNodeIssue ( releaseDate ) ,
4546 this . createBuildWGIssue ( releaseDate )
4647 ] ) ;
47- }
4848
49+ content . buildIssue = buildIssue ;
50+ content . dockerIssue = dockerIssue ;
51+
52+ const vulnerabilitiesJSONPath = getVulnerabilitiesJSONPath ( ) ;
53+ fs . writeFileSync ( vulnerabilitiesJSONPath , JSON . stringify ( content , null , 2 ) ) ;
54+ const commitMessage = 'chore: add build and docker issue link' ;
55+ commitAndPushVulnerabilitiesJSON ( [ vulnerabilitiesJSONPath ] ,
56+ commitMessage , { cli : this . cli , repository : this . repository } ) ;
57+
58+ this . cli . ok ( 'Added docker and build issue in vulnerabilities.json' ) ;
59+ }
4960 async createBuildWGIssue ( releaseDate ) {
5061 const repository = {
5162 owner : 'nodejs' ,
5263 repo : 'build'
5364 } ;
5465
5566 const { title, content } = this . createPreleaseAnnouncementIssue ( releaseDate , 'build' ) ;
56- await createIssue ( title , content , repository , { cli : this . cli , req : this . req } ) ;
67+ return createIssue ( title , content , repository , { cli : this . cli , req : this . req } ) ;
5768 }
5869
5970 createPreleaseAnnouncementIssue ( releaseDate , team ) {
@@ -71,6 +82,6 @@ export default class SecurityAnnouncement {
7182 } ;
7283
7384 const { title, content } = this . createPreleaseAnnouncementIssue ( releaseDate , 'docker' ) ;
74- await createIssue ( title , content , repository , { cli : this . cli , req : this . req } ) ;
85+ return createIssue ( title , content , repository , { cli : this . cli , req : this . req } ) ;
7586 }
7687}
0 commit comments