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

Function pinIssue

pkg/cmd/issue/pin/pin.go:115–133  ·  view source on GitHub ↗
(httpClient *http.Client, repo ghrepo.Interface, issue *api.Issue)

Source from the content-addressed store, hash-verified

113}
114
115func pinIssue(httpClient *http.Client, repo ghrepo.Interface, issue *api.Issue) error {
116 var mutation struct {
117 PinIssue struct {
118 Issue struct {
119 ID githubv4.ID
120 }
121 } `graphql:"pinIssue(input: $input)"`
122 }
123
124 variables := map[string]interface{}{
125 "input": githubv4.PinIssueInput{
126 IssueID: issue.ID,
127 },
128 }
129
130 gql := api.NewClientFromHTTP(httpClient)
131
132 return gql.Mutate(repo.RepoHost(), "IssuePin", &mutation, variables)
133}

Callers 1

pinRunFunction · 0.85

Calls 3

NewClientFromHTTPFunction · 0.92
MutateMethod · 0.65
RepoHostMethod · 0.65

Tested by

no test coverage detected