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

Link to this section Functions

Link to this function create_or_update_comment(github_issue, attrs) View Source
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.

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.