MCPcopy Create free account
hub / github.com/cli/cli / BranchDeleteRemote

Function BranchDeleteRemote

api/queries_pr.go:847–853  ·  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, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "git", "refs", fmt.Sprintf("heads/%s", branch))
849 if err != nil {
850 return err
851 }
852 return client.REST(repo.RepoHost(), "DELETE", path.String(), nil, nil)
853}
854
855type RefComparison struct {
856 AheadBy int

Callers 3

closeRunFunction · 0.92
deleteRemoteBranchMethod · 0.92
TestBranchDeleteRemoteFunction · 0.85

Calls 6

JoinPathFunction · 0.92
RepoOwnerMethod · 0.65
RepoNameMethod · 0.65
RESTMethod · 0.65
RepoHostMethod · 0.65
StringMethod · 0.65

Tested by 1

TestBranchDeleteRemoteFunction · 0.68