MCPcopy
hub / github.com/cli/cli / LinkProjectToRepository

Method LinkProjectToRepository

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

LinkProjectToRepository links a project to a repository.

(projectID string, repoID string)

Source from the content-addressed store, hash-verified

1613
1614// LinkProjectToRepository links a project to a repository.
1615func (c *Client) LinkProjectToRepository(projectID string, repoID string) error {
1616 var mutation linkProjectToRepoMutation
1617 variables := map[string]interface{}{
1618 "input": githubv4.LinkProjectV2ToRepositoryInput{
1619 ProjectID: githubv4.String(projectID),
1620 RepositoryID: githubv4.ID(repoID),
1621 },
1622 }
1623
1624 return c.Mutate("LinkProjectV2ToRepository", &mutation, variables)
1625}
1626
1627// LinkProjectToTeam links a project to a team.
1628func (c *Client) LinkProjectToTeam(projectID string, teamID string) error {

Callers 1

linkRepoFunction · 0.80

Calls 3

MutateMethod · 0.95
IDMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected