MCPcopy
hub / github.com/mislav/hub / Repository

Method Repository

github/client.go:207–221  ·  view source on GitHub ↗
(project *Project)

Source from the content-addressed store, hash-verified

205}
206
207func (client *Client) Repository(project *Project) (repo *Repository, err error) {
208 api, err := client.simpleApi()
209 if err != nil {
210 return
211 }
212
213 res, err := api.Get(fmt.Sprintf("repos/%s/%s", project.Owner, project.Name))
214 if err = checkStatus(200, "getting repository info", res, err); err != nil {
215 return
216 }
217
218 repo = &Repository{}
219 err = res.Unmarshal(&repo)
220 return
221}
222
223func (client *Client) CreateRepository(project *Project, description, homepage string, isPrivate bool) (repo *Repository, err error) {
224 repoURL := "user/repos"

Callers 6

getCloneUrlFunction · 0.95
transformFetchArgsFunction · 0.95
transformRemoteArgsFunction · 0.95
forkFunction · 0.95
createFunction · 0.95
pullRequestFunction · 0.80

Calls 4

simpleApiMethod · 0.95
checkStatusFunction · 0.85
GetMethod · 0.80
UnmarshalMethod · 0.80

Tested by

no test coverage detected