code_corps v0.0.1 CodeCorps.GitHub.Sync.GithubComment View Source
In charge of finding a CodeCorps.GithubComment to link with a
CodeCorps.Comment when processing a GitHub Comment payload.
The only entry point is create_or_update_comment/2.
Link to this section Summary
Functions
Finds or creates a CodeCorps.GithubComment using the data in a
GitHubComment payload
Deletes the CodeCorps.GithubComment record using the GitHub ID from a GitHub
API comment payload
Link to this section Types
result() :: {:ok, CodeCorps.GithubComment.t()} | {:error, Ecto.Changeset.t()}
Link to this section Functions
create_or_update_comment(CodeCorps.GithubIssue.t(), map()) :: result()
create_or_update_comment(CodeCorps.GithubRepo.t(), map()) :: result()
Finds or creates a CodeCorps.GithubComment using the data in a
GitHubComment payload.
The comment is matched with an existing GithubIssue record using the
issue_url property of the payload.
delete(String.t()) :: {:ok, CodeCorps.GithubComment.t()}
Deletes the CodeCorps.GithubComment record using the GitHub ID from a GitHub
API comment payload.
Returns the deleted CodeCorps.GithubComment record or an empty
CodeCorps.GithubComment record if no such record existed.