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