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
fix lines logic
  • Loading branch information
motatoes committed Dec 4, 2024
commit 151068cfd8ee92dc4c7d724bd303faab02a113e1
2 changes: 2 additions & 0 deletions backend/migrations/20241204194016.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Modify "digger_batches" table
ALTER TABLE "public"."digger_batches" ADD COLUMN "placeholder_comment_id_for_report" text NULL;
3 changes: 2 additions & 1 deletion backend/migrations/atlas.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
h1:fW4YtFhVfirvwGtHxnGXjFwChYhoj/5pW/XaA6rViHw=
h1:SB1sRi1zY0IoKioJ+Y0FtuIjHQv6XCvcsAJg0AEJNs4=
20231227132525.sql h1:43xn7XC0GoJsCnXIMczGXWis9d504FAWi4F1gViTIcw=
20240115170600.sql h1:IW8fF/8vc40+eWqP/xDK+R4K9jHJ9QBSGO6rN9LtfSA=
20240116123649.sql h1:R1JlUIgxxF6Cyob9HdtMqiKmx/BfnsctTl5rvOqssQw=
@@ -34,3 +34,4 @@ h1:fW4YtFhVfirvwGtHxnGXjFwChYhoj/5pW/XaA6rViHw=
20241107163722.sql h1:tk28AgXggvpEigTkWMYMxIVDPNdEUFGijaFWBqvlZhA=
20241107172343.sql h1:wtM1+uJZY6NiiDYabuzj/LAANAV7+xyUCL5U23v3e+c=
20241114202249.sql h1:LCRf42VUYB/uugR4gwp+fGPUomT0KhFA3eLjBK9JlZo=
20241204194016.sql h1:RgiJkZlAJSJjNCRD5RHmRr+65O9UDCRwGohQwdIMhGg=
4 changes: 3 additions & 1 deletion libs/comment_utils/reporting/reporting.go
Original file line number Diff line number Diff line change
@@ -205,7 +205,9 @@ func appendToExistingComment(ciService ci.PullRequestService, prNumber int, exis

// strip first and last lines
lines := strings.Split(existingCommentBody, "\n")
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.