MCPcopy
hub / github.com/cli/cli / CreateRepoTransformToV4

Function CreateRepoTransformToV4

api/queries_repo.go:1611–1630  ·  view source on GitHub ↗
(apiClient *Client, hostname string, method string, path string, body io.Reader)

Source from the content-addressed store, hash-verified

1609}
1610
1611func CreateRepoTransformToV4(apiClient *Client, hostname string, method string, path string, body io.Reader) (*Repository, error) {
1612 var responsev3 repositoryV3
1613 err := apiClient.REST(hostname, method, path, body, &responsev3)
1614
1615 if err != nil {
1616 return nil, err
1617 }
1618
1619 return &Repository{
1620 Name: responsev3.Name,
1621 CreatedAt: responsev3.CreatedAt,
1622 Owner: RepositoryOwner{
1623 Login: responsev3.Owner.Login,
1624 },
1625 ID: responsev3.NodeID,
1626 hostname: hostname,
1627 URL: responsev3.HTMLUrl,
1628 IsPrivate: responsev3.Private,
1629 }, nil
1630}
1631
1632// MapReposToIDs retrieves a set of IDs for the given set of repositories.
1633// This is similar logic to RepoNetwork, but only fetches databaseId and does not

Callers 2

repoCreateFunction · 0.92
editRunFunction · 0.92

Calls 1

RESTMethod · 0.65

Tested by

no test coverage detected