MCPcopy
hub / github.com/cli/cli / linkRepo

Function linkRepo

pkg/cmd/project/link/link.go:196–209  ·  view source on GitHub ↗
(c *api.Client, config linkConfig)

Source from the content-addressed store, hash-verified

194}
195
196func linkRepo(c *api.Client, config linkConfig) error {
197 repo, err := api.GitHubRepo(c, ghrepo.NewWithHost(config.opts.owner, config.opts.repo, config.opts.host))
198 if err != nil {
199 return err
200 }
201 config.opts.repoID = repo.ID
202
203 err = config.client.LinkProjectToRepository(config.opts.projectID, config.opts.repoID)
204 if err != nil {
205 return err
206 }
207
208 return printResults(config, config.opts.repo)
209}
210
211func linkTeam(c *api.Client, config linkConfig) error {
212 team, err := api.OrganizationTeam(c, config.opts.host, config.opts.owner, config.opts.team)

Callers 1

runLinkFunction · 0.85

Calls 4

GitHubRepoFunction · 0.92
NewWithHostFunction · 0.92
printResultsFunction · 0.70

Tested by

no test coverage detected