2
2
NEXT_SECURITY_RELEASE_REPOSITORY ,
3
3
checkoutOnSecurityReleaseBranch ,
4
4
getVulnerabilitiesJSON ,
5
+ getVulnerabilitiesJSONPath ,
5
6
validateDate ,
6
7
formatDateToYYYYMMDD ,
7
8
createIssue
@@ -40,20 +41,30 @@ export default class SecurityAnnouncement {
40
41
validateDate ( content . releaseDate ) ;
41
42
const releaseDate = new Date ( content . releaseDate ) ;
42
43
43
- await Promise . all ( [
44
+ const [ dockerIssue , buildIssue ] = await Promise . all ( [
44
45
this . createDockerNodeIssue ( releaseDate ) ,
45
46
this . createBuildWGIssue ( releaseDate )
46
47
] ) ;
47
- }
48
48
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
+ }
49
60
async createBuildWGIssue ( releaseDate ) {
50
61
const repository = {
51
62
owner : 'nodejs' ,
52
63
repo : 'build'
53
64
} ;
54
65
55
66
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 } ) ;
57
68
}
58
69
59
70
createPreleaseAnnouncementIssue ( releaseDate , team ) {
@@ -71,6 +82,6 @@ export default class SecurityAnnouncement {
71
82
} ;
72
83
73
84
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 } ) ;
75
86
}
76
87
}
0 commit comments