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

Function BranchDeleteRemote

api/queries_pr.go:847–850  ·  view source on GitHub ↗
(client *Client, repo ghrepo.Interface, branch string)

Source from the content-addressed store, hash-verified

845}
846
847func BranchDeleteRemote(client *Client, repo ghrepo.Interface, branch string) error {
848 path := fmt.Sprintf("repos/%s/%s/git/refs/heads/%s", repo.RepoOwner(), repo.RepoName(), url.PathEscape(branch))
849 return client.REST(repo.RepoHost(), "DELETE", path, nil, nil)
850}
851
852type RefComparison struct {
853 AheadBy int

Callers 3

closeRunFunction · 0.92
deleteRemoteBranchMethod · 0.92
TestBranchDeleteRemoteFunction · 0.85

Calls 4

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

Tested by 1

TestBranchDeleteRemoteFunction · 0.68