Skip to content

Commit

Permalink
fix: [AD-116] fixing card values in Metrics (#181)
Browse files Browse the repository at this point in the history
[AD-116] fixing query
  • Loading branch information
jsmid1 authored Oct 6, 2023
1 parent 65b52ed commit ea3aa51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/pkg/storage/ent/client/pullrequests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ea3aa51

Please sign in to comment.