MCPcopy
hub / github.com/cli/cli / unarchiveRepo

Function unarchiveRepo

pkg/cmd/repo/unarchive/http.go:10–28  ·  view source on GitHub ↗
(client *http.Client, repo *api.Repository)

Source from the content-addressed store, hash-verified

8)
9
10func unarchiveRepo(client *http.Client, repo *api.Repository) error {
11 var mutation struct {
12 UnarchiveRepository struct {
13 Repository struct {
14 ID string
15 }
16 } `graphql:"unarchiveRepository(input: $input)"`
17 }
18
19 variables := map[string]interface{}{
20 "input": githubv4.UnarchiveRepositoryInput{
21 RepositoryID: repo.ID,
22 },
23 }
24
25 gql := api.NewClientFromHTTP(client)
26 err := gql.Mutate(repo.RepoHost(), "UnarchiveRepository", &mutation, variables)
27 return err
28}

Callers 1

unarchiveRunFunction · 0.85

Calls 3

NewClientFromHTTPFunction · 0.92
MutateMethod · 0.65
RepoHostMethod · 0.65

Tested by

no test coverage detected