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()
|
||||
|
||||
issues, _, err := forgeClient.ListIssues(forgejo.ListIssueOption{
|
||||
Type: forgejo.IssueTypeIssue,
|
||||
Owner: "forgejo-actions",
|
||||
Type: forgejo.IssueTypeIssue,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
|
@ -207,7 +208,11 @@ var rootCmd = &cobra.Command{
|
|||
for _, issue := range issues {
|
||||
pretty.Logln(issue)
|
||||
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,
|
||||
}); err != nil {
|
||||
log.Fatalln(err)
|
||||
|
|
Loading…
Reference in a new issue