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

Function archiveRepo

pkg/cmd/repo/archive/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 archiveRepo(client *http.Client, repo *api.Repository) error {
11 var mutation struct {
12 ArchiveRepository struct {
13 Repository struct {
14 ID string
15 }
16 } `graphql:"archiveRepository(input: $input)"`
17 }
18
19 variables := map[string]any{
20 "input": githubv4.ArchiveRepositoryInput{
21 RepositoryID: repo.ID,
22 },
23 }
24
25 gql := api.NewClientFromHTTP(client)
26 err := gql.Mutate(repo.RepoHost(), "ArchiveRepository", &mutation, variables)
27 return err
28}

Callers 1

archiveRunFunction · 0.85

Calls 3

NewClientFromHTTPFunction · 0.92
MutateMethod · 0.65
RepoHostMethod · 0.65

Tested by

no test coverage detected