Problem
Right now, we pass in both the github api payload as well as a GithubIssue into the changeset builder.
In reality, all we need is the GithubIssue, since it contains the exact information we need to create a Task from it.
- modify
Adapters.Issue.to_task/1 to accept a GithubIssue struct (we can use Map.from_struct/1 and MapUtils.keys_to_string/1 for adapting it
- modify
Issues.ChangesetBuilder.build_changeset/5 into build_changeset/4 by removing the payload attribute
This would simplify the code, and potentially allow us to decouple further in the future.
Problem
Right now, we pass in both the github api payload as well as a
GithubIssueinto the changeset builder.In reality, all we need is the
GithubIssue, since it contains the exact information we need to create aTaskfrom it.Adapters.Issue.to_task/1to accept aGithubIssuestruct (we can useMap.from_struct/1andMapUtils.keys_to_string/1for adapting itIssues.ChangesetBuilder.build_changeset/5intobuild_changeset/4by removing thepayloadattributeThis would simplify the code, and potentially allow us to decouple further in the future.