(apiClient *Client, hostname string, method string, path string, body io.Reader)
| 1609 | } |
| 1610 | |
| 1611 | func 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 |
no test coverage detected