@@ -183,16 +183,38 @@ const (
183
183
prefixGitFooterChangeID = "Change-Id:"
184
184
)
185
185
186
- var (
187
- // GitHub repos we accept PRs for, mirroring them into Gerrit CLs.
188
- githubRepoWhitelist = map [string ]bool {
189
- "golang/scratch" : true ,
190
- }
191
- // Gerrit projects we accept PRs for.
192
- gerritProjectWhitelist = map [string ]bool {
193
- "scratch" : true ,
194
- }
195
- )
186
+ // Gerrit projects we accept PRs for.
187
+ var gerritProjectWhitelist = map [string ]bool {
188
+ "benchmarks" : true ,
189
+ "blog" : true ,
190
+ "arch" : true ,
191
+ "build" : true ,
192
+ "crypto" : true ,
193
+ "debug" : true ,
194
+ "example" : true ,
195
+ "exp" : true ,
196
+ "gddo" : true ,
197
+ "go" : true ,
198
+ "image" : true ,
199
+ "mobile" : true ,
200
+ "net" : true ,
201
+ "oauth2" : true ,
202
+ "perf" : true ,
203
+ "playground" : true ,
204
+ "proposal" : true ,
205
+ "review" : true ,
206
+ "scratch" : true ,
207
+ "sublime-build" : true ,
208
+ "sublime-config" : true ,
209
+ "sync" : true ,
210
+ "sys" : true ,
211
+ "talks" : true ,
212
+ "term" : true ,
213
+ "text" : true ,
214
+ "time" : true ,
215
+ "tools" : true ,
216
+ "tour" : true ,
217
+ }
196
218
197
219
type bot struct {
198
220
githubClient * github.Client
@@ -276,14 +298,13 @@ func (b *bot) checkPullRequests() {
276
298
277
299
if err := b .corpus .GitHub ().ForeachRepo (func (ghr * maintner.GitHubRepo ) error {
278
300
id := ghr .ID ()
279
- ownerRepo := id .Owner + "/" + id .Repo
280
- if ! githubRepoWhitelist [ownerRepo ] {
301
+ if id .Owner != "golang" || ! gerritProjectWhitelist [id .Repo ] {
281
302
return nil
282
303
}
283
304
return ghr .ForeachIssue (func (issue * maintner.GitHubIssue ) error {
284
305
if issue .PullRequest && issue .Closed {
285
306
// Clean up any reference of closed CLs within pendingCLs.
286
- shortLink := fmt .Sprintf ("%s#%d" , ownerRepo , issue .Number )
307
+ shortLink := fmt .Sprintf ("%s#%d" , id . Owner + "/" + id . Repo , issue .Number )
287
308
delete (b .pendingCLs , shortLink )
288
309
return nil
289
310
}
0 commit comments