From e21779d498d557bbac7cd236daafc7ec8ebef581 Mon Sep 17 00:00:00 2001 From: jsmid1 Date: Fri, 6 Oct 2023 09:43:09 +0200 Subject: [PATCH] [AD-116] fixing query --- backend/pkg/storage/ent/client/pullrequests.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/pkg/storage/ent/client/pullrequests.go b/backend/pkg/storage/ent/client/pullrequests.go index 734cfc20..43d846c9 100644 --- a/backend/pkg/storage/ent/client/pullrequests.go +++ b/backend/pkg/storage/ent/client/pullrequests.go @@ -102,8 +102,8 @@ func (d *Database) GetPullRequestsByRepository(repositoryName, organization, sta mergedPullRequestsInTimeRange, err := d.client.Repository.QueryPrs(repo).Select(). Where(predicate.PullRequests(pullrequests.State("MERGED"))). - Where(func(s *sql.Selector) { // "created_at BETWEEN ? AND 2022-08-17", "2022-08-16" - s.Where(sql.ExprP(fmt.Sprintf("created_at BETWEEN '%s' AND '%s'", startDate, endDate))) + Where(func(s *sql.Selector) { // "merged_at BETWEEN ? AND 2022-08-17", "2022-08-16" + s.Where(sql.ExprP(fmt.Sprintf("merged_at BETWEEN '%s' AND '%s'", startDate, endDate))) }). All(context.TODO()) if err != nil {