Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: support single comment summary with orchestrator mode #1850

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Next Next commit
attempt to append each time
  • Loading branch information
motatoes committed Dec 4, 2024
commit 60a7a1316cc5e81ae64294a4739987e5c6047029
4 changes: 2 additions & 2 deletions backend/controllers/github.go
Original file line number Diff line number Diff line change
@@ -500,7 +500,7 @@ func handlePullRequestEvent(gh utils.GithubClientProvider, payload *github.PullR
commentReporterManager.UpdateComment(fmt.Sprintf(":x: could not handle commentId: %v", err))
}

placeholderComment, err := ghService.PublishComment(prNumber, "<digger report placehoder>")
placeholderComment, err := ghService.PublishComment(prNumber, "digger report placehoder")
if err != nil {
log.Printf("strconv.ParseInt error: %v", err)
commentReporterManager.UpdateComment(fmt.Sprintf(":x: could not create placeholder commentId for report: %v", err))
@@ -882,7 +882,7 @@ func handleIssueCommentEvent(gh utils.GithubClientProvider, payload *github.Issu
return fmt.Errorf("comment reporter error: %v", err)
}

placeholderComment, err := ghService.PublishComment(issueNumber, "<digger report placehoder>")
placeholderComment, err := ghService.PublishComment(issueNumber, "digger report placehoder")
if err != nil {
log.Printf("strconv.ParseInt error: %v", err)
commentReporterManager.UpdateComment(fmt.Sprintf(":x: could not create placeholder commentId for report: %v", err))
6 changes: 3 additions & 3 deletions libs/comment_utils/reporting/reporting.go
Original file line number Diff line number Diff line change
@@ -205,9 +205,9 @@ func appendToExistingComment(ciService ci.PullRequestService, prNumber int, exis

// strip first and last lines
lines := strings.Split(existingCommentBody, "\n")
if len(lines) > 1 {
lines = lines[1 : len(lines)-1]
}
//if len(lines) > 1 {
// lines = lines[1 : len(lines)-1]
//}
existingCommentBody = strings.Join(lines, "\n")

existingCommentBody = existingCommentBody + "\n\n" + reportToAppend + "\n"
Loading
Oops, something went wrong.