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

Method LinkProjectToRepository

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

LinkProjectToRepository links a project to a repository.

(projectID string, repoID string)

Source from the content-addressed store, hash-verified

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