@@ -70,14 +70,15 @@ function validateRepo(r, licenses, repoData, cgData, repoMap) {
70
70
let shouldBeRepoManaged = false ;
71
71
const hasRecTrack = { ashnazg : null , repotype : null , tr : null } ; // TODO detect conflicting information (repo-type vs ash-nazg vs TR doc)
72
72
73
- let groups = [ ] ;
74
73
// is the repo associated with a CG in the CG monitor?
75
- const cgRepo = cgData . data . find ( cg => cg . repositories . includes ( 'https://github.com/' + fullName ( r ) || cg . repositories . includes ( 'https://github.com/' + fullName ( r ) + '/' ) ) ) ||
76
- // is the repo in WICG space?
77
- ( r . owner . login === 'WICG' ? { id : 80485 } : null ) ;
74
+ const cg = cgData . data . find ( cg => {
75
+ return cg . repositories . includes ( 'https://github.com/' + fullName ( r ) ) ||
76
+ cg . repositories . includes ( 'https://github.com/' + fullName ( r ) + '/' ) ;
77
+ } ) ;
78
+
78
79
// is the repo associated with a WG in the spec dashboard?
79
80
const wgRepo = repoMap [ fullName ( r ) ] ;
80
- const audioWgRepo = r . owner . login === 'WebAudio' ? { id : 46884 } : null ;
81
+
81
82
if ( wgRepo ) {
82
83
hasRecTrack . tr = wgRepo . some ( x => x . recTrack ) ;
83
84
}
@@ -104,6 +105,8 @@ function validateRepo(r, licenses, repoData, cgData, repoMap) {
104
105
} else if ( hardcodedRepoData [ fullName ( r ) ] ) {
105
106
conf = hardcodedRepoData [ fullName ( r ) ] ;
106
107
}
108
+
109
+ let groups = [ ] ;
107
110
if ( conf ) {
108
111
r . w3c = conf ;
109
112
// TODO: replace with JSON schema?
@@ -131,14 +134,16 @@ function validateRepo(r, licenses, repoData, cgData, repoMap) {
131
134
}
132
135
}
133
136
} else {
134
- if ( cgRepo ) {
135
- groups = [ cgRepo . id ] ;
137
+ if ( cg ) {
138
+ groups = [ cg . id ] ;
139
+ } else if ( r . owner . login === 'WICG' ) {
140
+ groups = [ 80485 ] ;
136
141
}
137
142
if ( wgRepo && wgRepo . length ) {
138
143
groups = groups . concat ( wgRepo . map ( x => x . group ) ) ;
139
144
}
140
- if ( audioWgRepo ) {
141
- groups . push ( audioWgRepo . id ) ;
145
+ if ( r . owner . login === 'WebAudio' ) {
146
+ groups . push ( 46884 ) ;
142
147
}
143
148
reportError ( 'now3cjson' ) ;
144
149
}
0 commit comments