update issue listing
All checks were successful
Gosec Check / Gosec Check (push) Successful in 1m6s

This commit is contained in:
Shane C 2024-09-11 15:59:38 -04:00
parent f1f461ec82
commit 5f1ac28901
Signed by: shanec
GPG key ID: E46B5FEA35B22FF9

View file

@ -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,