@@ -380,7 +380,7 @@ func (b *gopherbot) addGerritComment(ctx context.Context, changeID, comment stri
380
380
func (b * gopherbot ) freezeOldIssues (ctx context.Context ) error {
381
381
tooOld := time .Now ().Add (- 365 * 24 * time .Hour )
382
382
return b .gorepo .ForeachIssue (func (gi * maintner.GitHubIssue ) error {
383
- if ! gi .Closed || gi .Locked {
383
+ if ! gi .Closed || gi .PullRequest || gi . Locked {
384
384
return nil
385
385
}
386
386
if gi .Updated .After (tooOld ) {
@@ -403,7 +403,7 @@ func (b *gopherbot) freezeOldIssues(ctx context.Context) error {
403
403
// to get into an edit war with a human.
404
404
func (b * gopherbot ) labelProposals (ctx context.Context ) error {
405
405
return b .gorepo .ForeachIssue (func (gi * maintner.GitHubIssue ) error {
406
- if gi .Closed {
406
+ if gi .Closed || gi . PullRequest {
407
407
return nil
408
408
}
409
409
if ! strings .HasPrefix (gi .Title , "proposal:" ) && ! strings .HasPrefix (gi .Title , "Proposal:" ) {
@@ -436,7 +436,7 @@ func (b *gopherbot) labelProposals(ctx context.Context) error {
436
436
437
437
func (b * gopherbot ) setSubrepoMilestones (ctx context.Context ) error {
438
438
return b .gorepo .ForeachIssue (func (gi * maintner.GitHubIssue ) error {
439
- if gi .Closed || ! gi .Milestone .IsNone () || gi .HasEvent ("demilestoned" ) || gi .HasEvent ("milestoned" ) {
439
+ if gi .Closed || gi . PullRequest || ! gi .Milestone .IsNone () || gi .HasEvent ("demilestoned" ) || gi .HasEvent ("milestoned" ) {
440
440
return nil
441
441
}
442
442
if ! strings .HasPrefix (gi .Title , "x/" ) {
@@ -480,7 +480,7 @@ func (b *gopherbot) setSubrepoMilestones(ctx context.Context) error {
480
480
481
481
func (b * gopherbot ) setGccgoMilestones (ctx context.Context ) error {
482
482
return b .gorepo .ForeachIssue (func (gi * maintner.GitHubIssue ) error {
483
- if gi .Closed || ! gi .Milestone .IsNone () || gi .HasEvent ("demilestoned" ) || gi .HasEvent ("milestoned" ) {
483
+ if gi .Closed || gi . PullRequest || ! gi .Milestone .IsNone () || gi .HasEvent ("demilestoned" ) || gi .HasEvent ("milestoned" ) {
484
484
return nil
485
485
}
486
486
if ! strings .Contains (gi .Title , "gccgo" ) { // TODO: better gccgo bug report heuristic?
@@ -499,7 +499,7 @@ func (b *gopherbot) setGccgoMilestones(ctx context.Context) error {
499
499
500
500
func (b * gopherbot ) labelBuildIssues (ctx context.Context ) error {
501
501
return b .gorepo .ForeachIssue (func (gi * maintner.GitHubIssue ) error {
502
- if gi .Closed || ! strings .HasPrefix (gi .Title , "x/build" ) || gi .HasLabel ("Builders" ) || gi .HasEvent ("unlabeled" ) {
502
+ if gi .Closed || gi . PullRequest || ! strings .HasPrefix (gi .Title , "x/build" ) || gi .HasLabel ("Builders" ) || gi .HasEvent ("unlabeled" ) {
503
503
return nil
504
504
}
505
505
printIssue ("label-builders" , gi )
@@ -512,7 +512,7 @@ func (b *gopherbot) labelBuildIssues(ctx context.Context) error {
512
512
513
513
func (b * gopherbot ) labelMobileIssues (ctx context.Context ) error {
514
514
return b .gorepo .ForeachIssue (func (gi * maintner.GitHubIssue ) error {
515
- if gi .Closed || ! strings .HasPrefix (gi .Title , "x/mobile" ) || gi .HasLabel ("mobile" ) || gi .HasEvent ("unlabeled" ) {
515
+ if gi .Closed || gi . PullRequest || ! strings .HasPrefix (gi .Title , "x/mobile" ) || gi .HasLabel ("mobile" ) || gi .HasEvent ("unlabeled" ) {
516
516
return nil
517
517
}
518
518
printIssue ("label-mobile" , gi )
@@ -525,7 +525,7 @@ func (b *gopherbot) labelMobileIssues(ctx context.Context) error {
525
525
526
526
func (b * gopherbot ) labelDocumentationIssues (ctx context.Context ) error {
527
527
return b .gorepo .ForeachIssue (func (gi * maintner.GitHubIssue ) error {
528
- if gi .Closed || ! isDocumentationTitle (gi .Title ) || gi .HasLabel ("Documentation" ) || gi .HasEvent ("unlabeled" ) {
528
+ if gi .Closed || gi . PullRequest || ! isDocumentationTitle (gi .Title ) || gi .HasLabel ("Documentation" ) || gi .HasEvent ("unlabeled" ) {
529
529
return nil
530
530
}
531
531
printIssue ("label-documentation" , gi )
@@ -540,7 +540,7 @@ func (b *gopherbot) closeStaleWaitingForInfo(ctx context.Context) error {
540
540
const waitingForInfo = "WaitingForInfo"
541
541
now := time .Now ()
542
542
return b .gorepo .ForeachIssue (func (gi * maintner.GitHubIssue ) error {
543
- if gi .Closed || ! gi .HasLabel ("WaitingForInfo" ) {
543
+ if gi .Closed || gi . PullRequest || ! gi .HasLabel ("WaitingForInfo" ) {
544
544
return nil
545
545
}
546
546
var waitStart time.Time
@@ -646,7 +646,7 @@ func (b *gopherbot) cl2issue(ctx context.Context) error {
646
646
continue
647
647
}
648
648
gi := ref .Repo .Issue (ref .Number )
649
- if gi == nil || gi .HasLabel (frozenDueToAge ) {
649
+ if gi == nil || gi .PullRequest || gi . HasLabel (frozenDueToAge ) {
650
650
continue
651
651
}
652
652
hasComment := false
@@ -686,7 +686,7 @@ func canonicalLabelName(s string) string {
686
686
// but are being renamed to "needs-foo".
687
687
func (b * gopherbot ) updateNeeds (ctx context.Context ) error {
688
688
return b .gorepo .ForeachIssue (func (gi * maintner.GitHubIssue ) error {
689
- if gi .Closed {
689
+ if gi .Closed || gi . PullRequest {
690
690
return nil
691
691
}
692
692
var numNeeds int
0 commit comments