Skip to content

IssueComment.ChangesetBuilder does not require a payload #1084

@begedin

Description

@begedin

Problem

Right now, we pass in both the github api payload as well as a GithubComment into the changeset builder.

In reality, all we need is the GithubComment, since it contains the exact information we need to create a Comment.

  • modify Adapters.Comment.to_comment/1 to accept a GithubComment struct (we can use Map.from_struct/1 and MapUtils.keys_to_string/1 for adapting it
  • modify IssueComment.ChangesetBuilder.build_changeset/4 into build_changeset/3 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