From acc16e68903bad8bc7eb628a8bd3bb16886783b9 Mon Sep 17 00:00:00 2001 From: Bartosz Majsak Date: Wed, 15 Apr 2020 09:10:39 +0200 Subject: [PATCH] fix: prints only unlabeled PRs --- pkg/github/client.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/github/client.go b/pkg/github/client.go index 8f905c2..60209b4 100644 --- a/pkg/github/client.go +++ b/pkg/github/client.go @@ -126,7 +126,10 @@ func FindAssociatedPRs(client *githubv4.Client, repo []string, matchingCommit Ma if unlabeledPRs { _, _ = fmt.Fprint(os.Stderr, "#### Found unlabeled PRs\n\n") for i := range withoutDuplicates { - _, _ = fmt.Fprintf(os.Stderr, "* %s\n", withoutDuplicates[i].Permalink) + pr := withoutDuplicates[i] + if len(pr.Labels) == 0 { + _, _ = fmt.Fprintf(os.Stderr, "* %s\n", pr.Permalink) + } } } return withoutDuplicates