(client *api.Client, repo ghrepo.Interface, branch string)
| 25 | } |
| 26 | |
| 27 | func latestCommit(client *api.Client, repo ghrepo.Interface, branch string) (commit, error) { |
| 28 | var response commit |
| 29 | path, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "git", "refs", fmt.Sprintf("heads/%s", branch)) |
| 30 | if err != nil { |
| 31 | return response, err |
| 32 | } |
| 33 | err = client.REST(repo.RepoHost(), "GET", path.String(), nil, &response) |
| 34 | return response, err |
| 35 | } |
| 36 | |
| 37 | type upstreamMergeErr struct{ error } |
| 38 |