Skip to content

Commit 3953f8e

Browse files
committed
fix: deduplicate contributor list and add limit
1 parent aced7bf commit 3953f8e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/algora/workspace/workspace.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,10 @@ defmodule Algora.Workspace do
546546
join: ro in assoc(r, :user),
547547
where: ro.provider_login == ^repo_owner,
548548
join: u in assoc(c, :user),
549+
distinct: [c.user_id],
549550
select_merge: %{user: u},
550-
order_by: [desc: c.contributions, asc: c.inserted_at, asc: c.id]
551+
order_by: [desc: c.contributions, asc: c.inserted_at, asc: c.id],
552+
limit: 50
551553
)
552554
)
553555
end

0 commit comments

Comments
 (0)