Skip to content

Issues.ChangesetBuilder does not require a payload #1085

@begedin

Description

@begedin

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions