code_corps v0.0.1 CodeCorps.GitHub.Sync.GithubPullRequest View Source
In charge of finding a pull request to link with a GithubPullRequest record
when processing a GitHub Pull Request payload.
The only entry point is create_or_update_pull_request/2.
Link to this section Summary
Functions
Finds or creates a GithubPullRequest using the data in a GitHub PullRequest
payload
Link to this section Functions
Link to this function
create_or_update_pull_request(payload, github_repo)
View Source
create_or_update_pull_request(map(), CodeCorps.GithubRepo.t()) :: linking_result()
Finds or creates a GithubPullRequest using the data in a GitHub PullRequest
payload.
The process is as follows:
Search for the pull request in our database with the payload data.
- If we return a single
GithubPullRequest, then theGithubPullRequestshould be updated. - If there are no matching
GithubPullRequestrecords, then aGithubPullRequestshould be created.
- If we return a single