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

Method LinkProjectToRepository

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

LinkProjectToRepository links a project to a repository.

(projectID string, repoID string)

Source from the content-addressed store, hash-verified

1650
1651// LinkProjectToRepository links a project to a repository.
1652func (c *Client) LinkProjectToRepository(projectID string, repoID string) error {
1653 var mutation linkProjectToRepoMutation
1654 variables := map[string]any{
1655 "input": githubv4.LinkProjectV2ToRepositoryInput{
1656 ProjectID: githubv4.String(projectID),
1657 RepositoryID: githubv4.ID(repoID),
1658 },
1659 }
1660
1661 return c.Mutate("LinkProjectV2ToRepository", &mutation, variables)
1662}
1663
1664// LinkProjectToTeam links a project to a team.
1665func (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