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

Function PullRequestClose

api/queries_pr.go:742–759  ·  view source on GitHub ↗
(httpClient *http.Client, repo ghrepo.Interface, prID string)

Source from the content-addressed store, hash-verified

740}
741
742func PullRequestClose(httpClient *http.Client, repo ghrepo.Interface, prID string) error {
743 var mutation struct {
744 ClosePullRequest struct {
745 PullRequest struct {
746 ID githubv4.ID
747 }
748 } `graphql:"closePullRequest(input: $input)"`
749 }
750
751 variables := map[string]interface{}{
752 "input": githubv4.ClosePullRequestInput{
753 PullRequestID: prID,
754 },
755 }
756
757 client := NewClientFromHTTP(httpClient)
758 return client.Mutate(repo.RepoHost(), "PullRequestClose", &mutation, variables)
759}
760
761func PullRequestReopen(httpClient *http.Client, repo ghrepo.Interface, prID string) error {
762 var mutation struct {

Callers 2

apiCloseFunction · 0.92
closeRunFunction · 0.92

Calls 3

NewClientFromHTTPFunction · 0.85
MutateMethod · 0.65
RepoHostMethod · 0.65

Tested by

no test coverage detected