Skip to content

Commit 3ebe21a

Browse files
committed
fix compiler warnings
1 parent 5607166 commit 3ebe21a

File tree

6 files changed

+11
-21
lines changed

6 files changed

+11
-21
lines changed

lib/algora/integrations/github/poller/search_consumer.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ defmodule Algora.Github.Poller.SearchConsumer do
44

55
alias Algora.Accounts
66
alias Algora.Bounties
7-
alias Algora.Repo
87
alias Algora.Util
9-
alias Algora.Workspace.CommandResponse
108

119
require Logger
1210

lib/algora/workspace/workspace.ex

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -984,22 +984,6 @@ defmodule Algora.Workspace do
984984
Enum.uniq_by(users_with_contributions ++ users_marked_synced, & &1.id)
985985
end
986986

987-
@spec get_existing_contributions(list(String.t())) :: list(map())
988-
defp get_existing_contributions(provider_logins) do
989-
Repo.all(
990-
from uc in UserContribution,
991-
join: u in assoc(uc, :user),
992-
join: r in assoc(uc, :repository),
993-
join: repo_owner in assoc(r, :user),
994-
where: u.provider == "github",
995-
where: u.provider_login in ^provider_logins,
996-
select: %{
997-
provider_login: u.provider_login,
998-
repo_name: fragment("? || '/' || ?", repo_owner.provider_login, r.name),
999-
contribution_count: uc.contribution_count
1000-
}
1001-
)
1002-
end
1003987

1004988
@spec mark_users_as_synced(list(String.t()), list(User.t())) :: :ok
1005989
defp mark_users_as_synced(users_without_contributions, users) do

lib/algora_web/controllers/webhooks/github_controller.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ defmodule AlgoraWeb.Webhooks.GithubController do
1717
alias Algora.Repo
1818
alias Algora.Util
1919
alias Algora.Workspace
20-
alias Algora.Workspace.CommandResponse
2120
alias Algora.Workspace.Installation
2221

2322
require Logger

lib/algora_web/live/challenges/primeintellect_live.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ defmodule AlgoraWeb.Challenges.PrimeintellectLive do
176176
)} in rewards. Select a bounty to start building. Each environment should integrate with our RL training infrastructure.
177177
</p>
178178
<div class="mx-auto grid gap-6 px-6 sm:grid-cols-2 lg:grid-cols-3 lg:px-8">
179-
<%= for {bounty, index} <- Enum.with_index(@bounties) do %>
179+
<%= for {bounty, _index} <- Enum.with_index(@bounties) do %>
180180
<a
181181
href={Bounty.url(bounty)}
182182
target="_blank"

lib/algora_web/live/org/dashboard_live.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ defmodule AlgoraWeb.Org.DashboardLive do
2121
alias Algora.Repo
2222
alias Algora.Workspace
2323
alias Algora.Workspace.Contributor
24-
alias Algora.Workspace.Ticket
2524
alias AlgoraWeb.Components.Logos
2625
alias AlgoraWeb.Constants
2726
alias AlgoraWeb.Forms.BountyForm

test/support/github_mock.ex

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,14 @@ defmodule Algora.Support.GithubMock do
202202
def remove_label_from_issue(_access_token, _owner, _repo, _number, _label) do
203203
{:ok, %{"id" => random_id()}}
204204
end
205+
206+
@impl true
207+
def list_user_followers(_access_token, _username, _opts \\ []) do
208+
{:ok, []}
209+
end
210+
211+
@impl true
212+
def list_user_following(_access_token, _username, _opts \\ []) do
213+
{:ok, []}
214+
end
205215
end

0 commit comments

Comments
 (0)