{"modulePath":"github.com/hellofresh/github-cli","version":"v0.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package repo\n\n## Variables\n\n```go\nvar (\n\t// ErrRepositoryAlreadyExists is used when the repository already exists\n\tErrRepositoryAlreadyExists = errors.New(\"github repository already exists\")\n\t// ErrRepositoryLimitExceeded is used when the repository limit is exceeded\n\tErrRepositoryLimitExceeded = errors.New(\"limit for private repos on this account is exceeded\")\n\t// ErrLabelNotFound is used when a label is not found\n\tErrLabelNotFound = errors.New(\"github label does not exist\")\n\t// ErrLabeAlreadyExists is used when a label is not found\n\tErrLabeAlreadyExists = errors.New(\"github label already exists\")\n\t// ErrWebhookAlreadyExist is used when a webhook already exists\n\tErrWebhookAlreadyExist = errors.New(\"github webhook already exists\")\n\t// ErrOrganizationNotFound is used when a webhook already exists\n\tErrOrganizationNotFound = errors.New(\"you must specify an organization to use this functionality\")\n)\n```\n\n## Types\n\n```go\ntype GithubRepo struct {\n\tGithubClient *github.Client\n}\n```\nGithubRepo contains all the hellofresh repository creation Opts for github\n\n```go\nfunc NewGithub(githubClient *github.Client) *GithubRepo\n```\nNewGithub creates a new instance of Client\n\n```go\nfunc (c *GithubRepo) AddBranchProtections(ctx context.Context, repo string, org string, protections config.BranchProtections) error\n```\nAddBranchProtections adds an slice of branch protections to the repository\n\n```go\nfunc (c *GithubRepo) AddCollaborators(ctx context.Context, repo string, org string, collaborators []*config.Collaborator) error\n```\nAddCollaborators adds an slice of collaborators and their permissions to the repository\n\n```go\nfunc (c *GithubRepo) AddLabelsToRepo(ctx context.Context, repo string, org string, opts *LabelsOpts) error\n```\nAddLabelsToRepo adds an slice of labels to the repository. Optionally this can also remove github's default labels\n\n```go\nfunc (c *GithubRepo) AddTeamsToRepo(ctx context.Context, repo string, org string, teams []*config.Team) error\n```\nAddTeamsToRepo adds an slice of teams and their permissions to a repository\n\n```go\nfunc (c *GithubRepo) AddWebhooksToRepo(ctx context.Context, repo string, org string, webhooks []*config.Webhook) error\n```\nAddWebhooksToRepo adds an slice of webhooks to the repository\n\n```go\nfunc (c *GithubRepo) CreateRepo(ctx context.Context, org string, repoOpts *github.Repository) (*github.Repository, error)\n```\nCreateRepo creates a github repository\n\n```go\ntype GithubRepoOpts struct {\n\tTeams             []*config.Team\n\tCollaborators     []*config.Collaborator\n\tLabels            *LabelsOpts\n\tWebhooks          []*config.Webhook\n\tBranchProtections config.BranchProtections\n}\n```\nGithubRepoOpts represents the repo creation options\n\n```go\ntype LabelsOpts struct {\n\tRemoveDefaultLabels bool\n\tLabels              []*config.Label\n}\n```\nLabelsOpts represents label options\n\n","path":"github.com/hellofresh/github-cli/pkg/repo","name":"repo","synopsis":"","isRedistributable":true}
