MCPcopy Create free account
hub / github.com/cli/cli / LinkProjectToRepository

Method LinkProjectToRepository

pkg/cmd/project/shared/queries/queries.go:1662–1672  ·  view source on GitHub ↗

LinkProjectToRepository links a project to a repository.

(projectID string, repoID string)

Source from the content-addressed store, hash-verified

1660
1661// LinkProjectToRepository links a project to a repository.
1662func (c *Client) LinkProjectToRepository(projectID string, repoID string) error {
1663 var mutation linkProjectToRepoMutation
1664 variables := map[string]interface{}{
1665 "input": githubv4.LinkProjectV2ToRepositoryInput{
1666 ProjectID: githubv4.String(projectID),
1667 RepositoryID: githubv4.ID(repoID),
1668 },
1669 }
1670
1671 return c.Mutate("LinkProjectV2ToRepository", &mutation, variables)
1672}
1673
1674// LinkProjectToTeam links a project to a team.
1675func (c *Client) LinkProjectToTeam(projectID string, teamID string) error {

Callers 1

linkRepoFunction · 0.80

Calls 3

MutateMethod · 0.95
StringMethod · 0.65
IDMethod · 0.65

Tested by

no test coverage detected