MCPcopy Index your code
hub / github.com/cli/cli / latestCommit

Function latestCommit

pkg/cmd/repo/sync/http.go:26–31  ·  view source on GitHub ↗
(client *api.Client, repo ghrepo.Interface, branch string)

Source from the content-addressed store, hash-verified

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

Callers 1

executeRemoteRepoSyncFunction · 0.85

Calls 4

RepoOwnerMethod · 0.65
RepoNameMethod · 0.65
RESTMethod · 0.65
RepoHostMethod · 0.65

Tested by

no test coverage detected