edit issue get settings
Some checks failed
Gosec Check / Gosec Check (push) Failing after 50s

This commit is contained in:
Shane C 2024-09-06 16:24:47 -04:00
parent 276217ad2d
commit 0c677cecbb
Signed by: shanec
GPG key ID: E46B5FEA35B22FF9

View file

@ -183,7 +183,6 @@ var rootCmd = &cobra.Command{
repoOwner, repoName := actionCtx.Repo() repoOwner, repoName := actionCtx.Repo()
issues, _, err := forgeClient.ListIssues(forgejo.ListIssueOption{ issues, _, err := forgeClient.ListIssues(forgejo.ListIssueOption{
KeyWord: "GoSec Report",
Type: forgejo.IssueTypeIssue, Type: forgejo.IssueTypeIssue,
}) })
if err != nil { if err != nil {
@ -206,6 +205,7 @@ var rootCmd = &cobra.Command{
} }
} else { } else {
for _, issue := range issues { for _, issue := range issues {
fmt.Println(issue.OriginalAuthor)
if issue.Title == "GoSec Report" && strings.Contains(issue.Body, "GoSec Report:") { if issue.Title == "GoSec Report" && strings.Contains(issue.Body, "GoSec Report:") {
if _, _, err := forgeClient.EditIssue(repoOwner, repoName, issue.ID, forgejo.EditIssueOption{ if _, _, err := forgeClient.EditIssue(repoOwner, repoName, issue.ID, forgejo.EditIssueOption{
Body: &markdownOutputStr, Body: &markdownOutputStr,