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

Function BranchDeleteRemote

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

Source from the content-addressed store, hash-verified

870}
871
872func BranchDeleteRemote(client *Client, repo ghrepo.Interface, branch string) error {
873 path, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "git", "refs", fmt.Sprintf("heads/%s", branch))
874 if err != nil {
875 return err
876 }
877 return client.REST(repo.RepoHost(), "DELETE", path.String(), nil, nil)
878}
879
880type RefComparison struct {
881 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