diff --git a/cmd/root.go b/cmd/root.go index 1c94b53..3a99a26 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -198,19 +198,16 @@ var rootCmd = &cobra.Command{ } issues, _, err := forgeClient.ListRepoIssues(repoOwner, repoName, forgejo.ListIssueOption{ - State: forgejo.StateOpen, ListOptions: forgejo.ListOptions{ Page: -1, }, - Type: forgejo.IssueTypeIssue, - CreatedBy: myUser.UserName, }) if err != nil { log.Fatalln(err) } for _, issue := range issues { - if issue.Title == "GoSec Report" && repoOwner+"/"+repoName == issue.Repository.FullName { + if issue.State == forgejo.StateOpen && issue.Title == "GoSec Report" && repoOwner+"/"+repoName == issue.Repository.FullName && myUser.UserName == issue.Poster.UserName { pretty.Println(issue) if _, _, err := forgeClient.EditIssue(repoOwner, repoName, issue.Index, forgejo.EditIssueOption{ Body: &markdownOutputStr,