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

Function disableAutoMerge

pkg/cmd/pr/merge/http.go:106–119  ·  view source on GitHub ↗
(client *http.Client, repo ghrepo.Interface, prID string)

Source from the content-addressed store, hash-verified

104}
105
106func disableAutoMerge(client *http.Client, repo ghrepo.Interface, prID string) error {
107 var mutation struct {
108 DisablePullRequestAutoMerge struct {
109 ClientMutationId string
110 } `graphql:"disablePullRequestAutoMerge(input: {pullRequestId: $prID})"`
111 }
112
113 variables := map[string]any{
114 "prID": githubv4.ID(prID),
115 }
116
117 gql := api.NewClientFromHTTP(client)
118 return gql.Mutate(repo.RepoHost(), "PullRequestAutoMergeDisable", &mutation, variables)
119}
120
121func getMergeText(client *http.Client, repo ghrepo.Interface, prID string, mergeMethod PullRequestMergeMethod) (string, string, error) {
122 var method githubv4.PullRequestMergeMethod

Callers 1

disableAutoMergeMethod · 0.85

Calls 4

NewClientFromHTTPFunction · 0.92
IDMethod · 0.65
MutateMethod · 0.65
RepoHostMethod · 0.65

Tested by

no test coverage detected