Skip to content

Commit f97aaee

Browse files
committed
Rename Sync.Repo to Sync.GithubRepo, to follow convention
1 parent 2232001 commit f97aaee

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/code_corps/github/sync/repo/repo.ex renamed to lib/code_corps/github/sync/github_repo/github_repo.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
defmodule CodeCorps.GitHub.Sync.Repo do
1+
defmodule CodeCorps.GitHub.Sync.GithubRepo do
22
import Ecto.Query
33

44
alias CodeCorps.{

lib/code_corps/github/sync/sync.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ defmodule CodeCorps.GitHub.Sync do
289289
multi =
290290
Multi.new
291291
|> Multi.run(:installation, fn _ -> payload |> Sync.Installation.sync() end)
292-
|> Multi.run(:repos, fn %{installation: installation} -> installation |> Sync.Repo.sync_installation() end)
292+
|> Multi.run(:repos, fn %{installation: installation} -> installation |> Sync.GithubRepo.sync_installation() end)
293293

294294
case multi |> Repo.transaction() do
295295
{:ok, %{installation: installation, repos: {synced_repos, _deleted_repos}}} ->
@@ -343,7 +343,7 @@ defmodule CodeCorps.GitHub.Sync do
343343
payload |> Finder.find_installation()
344344
end)
345345
|> Multi.run(:repos, fn %{installation: installation} ->
346-
installation |> Sync.Repo.sync_installation(payload)
346+
installation |> Sync.GithubRepo.sync_installation(payload)
347347
end)
348348

349349
case multi |> Repo.transaction() do

test/lib/code_corps/github/sync/github_repo/repo_test.exs renamed to test/lib/code_corps/github/sync/github_repo/github_repo_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
defmodule CodeCorps.GitHub.Sync.RepoTest do
1+
defmodule CodeCorps.GitHub.Sync.GithubRepoTest do
22
@moduledoc false
33

44
use CodeCorps.DbAccessCase
@@ -31,7 +31,7 @@ defmodule CodeCorps.GitHub.Sync.RepoTest do
3131
_matched_repo = insert(:github_repo, github_app_installation: installation, github_id: matched_repo_github_id)
3232

3333
{:ok, {synced_repos, deleted_repos}} =
34-
installation |> Sync.Repo.sync_installation()
34+
installation |> Sync.GithubRepo.sync_installation()
3535

3636
assert synced_repos |> Enum.count == 2
3737
assert deleted_repos |> Enum.count == 1
@@ -76,7 +76,7 @@ defmodule CodeCorps.GitHub.Sync.RepoTest do
7676

7777
with_mock_api(InvalidRepoRequest) do
7878
{:error, {:sync, {repos, changesets}}} =
79-
installation |> Sync.Repo.sync_installation()
79+
installation |> Sync.GithubRepo.sync_installation()
8080

8181
assert repos |> Enum.count == 1
8282
assert changesets |> Enum.count == 1

0 commit comments

Comments
 (0)