@@ -291,6 +291,7 @@ func (r *Repo) LoadLocalKEPs(sig string) ([]*api.Proposal, error) {
291
291
292
292
func (r * Repo ) loadKEPPullRequests (sig string ) ([]* api.Proposal , error ) {
293
293
// Initialize github client
294
+ logrus .Debugf ("Initializing github client to load PRs for sig: %v" , sig )
294
295
var auth * http.Client
295
296
ctx := context .Background ()
296
297
if r .Token != "" {
@@ -301,6 +302,7 @@ func (r *Repo) loadKEPPullRequests(sig string) ([]*api.Proposal, error) {
301
302
302
303
// Fetch list of all PRs if none exists
303
304
if r .allPRs == nil {
305
+ logrus .Debugf ("Initializing list of all PRs for %v/%v" , remoteOrg , remoteRepo )
304
306
r .allPRs = []* github.PullRequest {}
305
307
306
308
opt := & github.PullRequestListOptions {
@@ -330,9 +332,10 @@ func (r *Repo) loadKEPPullRequests(sig string) ([]*api.Proposal, error) {
330
332
}
331
333
332
334
kepPRs := make ([]* github.PullRequest , 10 )
335
+ sigLabel := strings .Replace (sig , "-" , "/" , 1 )
336
+ logrus .Debugf ("Searching list of %v PRs for %v/%v with labels: [%v, %v]" , len (r .allPRs ), remoteOrg , remoteRepo , sigLabel , proposalLabel )
333
337
for _ , pr := range r .allPRs {
334
338
foundKind , foundSIG := false , false
335
- sigLabel := strings .Replace (sig , "-" , "/" , 1 )
336
339
337
340
for _ , l := range pr .Labels {
338
341
if * l .Name == proposalLabel {
@@ -348,8 +351,11 @@ func (r *Repo) loadKEPPullRequests(sig string) ([]*api.Proposal, error) {
348
351
continue
349
352
}
350
353
354
+ logrus .Debugf ("Found #%v" , pr .GetHTMLURL ())
355
+
351
356
kepPRs = append (kepPRs , pr )
352
357
}
358
+ logrus .Debugf ("Found %v PRs for %v/%v with labels: [%v, %v]" , len (kepPRs ), remoteOrg , remoteRepo , sigLabel , proposalLabel )
353
359
354
360
if len (kepPRs ) == 0 {
355
361
return nil , nil
@@ -375,6 +381,7 @@ func (r *Repo) loadKEPPullRequests(sig string) ([]*api.Proposal, error) {
375
381
// touched by a PR. This may result in multiple versions of the same KEP.
376
382
var allKEPs []* api.Proposal
377
383
for _ , pr := range kepPRs {
384
+ logrus .Debugf ("Getting list of files for %v" , pr .GetHTMLURL ())
378
385
files , _ , err := gh .PullRequests .ListFiles (
379
386
context .Background (),
380
387
remoteOrg ,
0 commit comments