Skip to content

Commit a895d95

Browse files
committed
Remove unused Sync.Issue module. Cleaned up tests and events for it.
1 parent 2b7fafb commit a895d95

File tree

4 files changed

+173
-191
lines changed

4 files changed

+173
-191
lines changed

lib/code_corps/github/sync/issue/issue.ex

Lines changed: 0 additions & 38 deletions
This file was deleted.

lib/code_corps/github/sync/sync.ex

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@ defmodule CodeCorps.GitHub.Sync do
4141
multi =
4242
Multi.new
4343
|> Multi.run(:repo, fn _ -> Finder.find_repo(payload) end)
44-
# steps :github_user, :github_issue, :issue_user, :task
45-
|> Multi.merge(fn %{repo: github_repo} -> issue_payload |> Sync.Issue.sync(github_repo) end)
44+
|> Multi.run(:github_issue, fn %{repo: github_repo} ->
45+
issue_payload
46+
|> Sync.Issue.GithubIssue.create_or_update_issue(github_repo)
47+
end)
48+
|> Multi.run(:issue_user, fn %{github_issue: github_issue} ->
49+
github_issue |> Sync.User.RecordLinker.link_to(issue_payload)
50+
end)
51+
|> Multi.run(:task, fn %{github_issue: github_issue, issue_user: user} ->
52+
github_issue |> Sync.Issue.Task.sync_github_issue(user)
53+
end)
4654

4755
case multi |> Repo.transaction() do
4856
{:ok, %{task: task}} -> {:ok, task}

test/lib/code_corps/github/sync/issue/issue_test.exs

Lines changed: 0 additions & 136 deletions
This file was deleted.

0 commit comments

Comments
 (0)