From: Karim Hamidou Date: Wed, 26 Jun 2024 04:21:01 +0000 (-0700) Subject: fix conditional X-Git-Tag: 0.5~7 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=20fa44e94785aeb70bd02801fcbb777fd2408acd;p=prguy.git fix conditional --- diff --git a/cmd/prguy/repos.go b/cmd/prguy/repos.go index 1d1f15e..513db8b 100644 --- a/cmd/prguy/repos.go +++ b/cmd/prguy/repos.go @@ -63,12 +63,10 @@ func listUserPRs(token string) ([]pullRequest, []pullRequest, error) { for _, pr := range jsonData { reason := pr["reason"].(string) - if reason != "author" || reason != "review_requested" { + if reason != "author" && reason != "review_requested" { continue } - fmt.Println(pr) - subject := pr["subject"].(map[string]interface{}) prAPIUrl := subject["url"].(string) prData, err := fetchOneRESTObject(prAPIUrl, token)