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

Function PullRequestClose

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

Source from the content-addressed store, hash-verified

765}
766
767func PullRequestClose(httpClient *http.Client, repo ghrepo.Interface, prID string) error {
768 var mutation struct {
769 ClosePullRequest struct {
770 PullRequest struct {
771 ID githubv4.ID
772 }
773 } `graphql:"closePullRequest(input: $input)"`
774 }
775
776 variables := map[string]any{
777 "input": githubv4.ClosePullRequestInput{
778 PullRequestID: prID,
779 },
780 }
781
782 client := NewClientFromHTTP(httpClient)
783 return client.Mutate(repo.RepoHost(), "PullRequestClose", &mutation, variables)
784}
785
786func PullRequestReopen(httpClient *http.Client, repo ghrepo.Interface, prID string) error {
787 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