Skip to content

Commit 4741633

Browse files
author
Tomas
committed
fix: Consider first comment to be of type Review
1 parent 7932958 commit 4741633

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/plugins/dora/tasks/change_lead_time_calculator.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ func getFirstReview(prId string, prCreator string, db dal.Dal) (*code.PullReques
185185
review := &code.PullRequestComment{}
186186
// Define the SQL clauses for the database query
187187
commentClauses := []dal.Clause{
188-
dal.From(&code.PullRequestComment{}), // Select from the "pull_request_comments" table
189-
dal.Where("pull_request_id = ? and account_id != ?", prId, prCreator), // Filter by the PR ID and exclude comments from the PR creator
190-
dal.Orderby("created_date ASC"), // Order by the created date of the review comments (ascending)
188+
dal.From(&code.PullRequestComment{}), // Select from the "pull_request_comments" table
189+
dal.Where("pull_request_id = ? and account_id != ? and type = ?", prId, prCreator, code.REVIEW), // Filter by the PR ID and exclude comments from the PR creator
190+
dal.Orderby("created_date ASC"), // Order by the created date of the review comments (ascending)
191191
}
192192

193193
// Execute the query and retrieve the first review comment

0 commit comments

Comments
 (0)