MCPcopy
hub / github.com/cli/cli / New

Function New

internal/ghrepo/repo.go:21–23  ·  view source on GitHub ↗

New instantiates a GitHub repository from owner and name arguments

(owner, repo string)

Source from the content-addressed store, hash-verified

19
20// New instantiates a GitHub repository from owner and name arguments
21func New(owner, repo string) Interface {
22 return NewWithHost(owner, repo, ghinstance.Default())
23}
24
25// NewWithHost is like New with an explicit host name
26func NewWithHost(owner, repo, hostname string) Interface {

Callers 15

Test_Remotes_FindByNameFunction · 0.92
Test_Remotes_FindByRepoFunction · 0.92
Test_FilterByHostsFunction · 0.92
TestDeleteRunFunction · 0.92
TestListRunFunction · 0.92
TestListFunction · 0.92
TestSearchFunction · 0.92
TestListCategoriesFunction · 0.92
TestGetByNumberFunction · 0.92
TestGetWithCommentsFunction · 0.92
TestCreateFunction · 0.92
TestListLabelsFunction · 0.92

Calls 2

DefaultFunction · 0.92
NewWithHostFunction · 0.85

Tested by 15

Test_Remotes_FindByNameFunction · 0.74
Test_Remotes_FindByRepoFunction · 0.74
Test_FilterByHostsFunction · 0.74
TestDeleteRunFunction · 0.74
TestListRunFunction · 0.74
TestListFunction · 0.74
TestSearchFunction · 0.74
TestListCategoriesFunction · 0.74
TestGetByNumberFunction · 0.74
TestGetWithCommentsFunction · 0.74
TestCreateFunction · 0.74
TestListLabelsFunction · 0.74