This commit is contained in:
parent
0059e7de34
commit
1fedfc0ffb
1 changed files with 7 additions and 2 deletions
|
@ -183,7 +183,8 @@ var rootCmd = &cobra.Command{
|
||||||
repoOwner, repoName := actionCtx.Repo()
|
repoOwner, repoName := actionCtx.Repo()
|
||||||
|
|
||||||
issues, _, err := forgeClient.ListIssues(forgejo.ListIssueOption{
|
issues, _, err := forgeClient.ListIssues(forgejo.ListIssueOption{
|
||||||
Type: forgejo.IssueTypeIssue,
|
Owner: "forgejo-actions",
|
||||||
|
Type: forgejo.IssueTypeIssue,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
|
@ -207,7 +208,11 @@ var rootCmd = &cobra.Command{
|
||||||
for _, issue := range issues {
|
for _, issue := range issues {
|
||||||
pretty.Logln(issue)
|
pretty.Logln(issue)
|
||||||
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{
|
issueID, err := strconv.Atoi(string(issue.HTMLURL[len(issue.HTMLURL)-1]))
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalln(err)
|
||||||
|
}
|
||||||
|
if _, _, err := forgeClient.EditIssue(repoOwner, repoName, int64(issueID), forgejo.EditIssueOption{
|
||||||
Body: &markdownOutputStr,
|
Body: &markdownOutputStr,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
|
|
Loading…
Reference in a new issue