{"modulePath":"github.com/aws-controllers-k8s/dev-tools","version":"v0.0.0-20260912001542-f2bbad79f3d4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Constants\n\n```go\nconst (\n\tACKOrg = \"aws-controllers-k8s\"\n)\n```\n\n## Variables\n\n```go\nvar ErrForkNotFound = errors.New(\"fork not found\")\n```\n\n## Types\n\n```go\ntype Client struct {\n\t*github.Client\n}\n```\nClient is a github.Client wrapper\n\n```go\nfunc NewClient(token string) *Client\n```\nNewClient takes a token and instantiate a new Client object\n\n```go\nfunc (c *Client) ForkRepository(ctx context.Context, repoName string) error\n```\nForkRepository forks a Github repository from the ACK organisation.\n\n```go\nfunc (c *Client) GetRepository(ctx context.Context, owner, repoName string) (*github.Repository, error)\n```\nGetRepository takes an owner and repoName and returns the Github repository informations\n\n```go\nfunc (c *Client) GetUserRepositoryFork(ctx context.Context, owner string, repoName string) (*github.Repository, error)\n```\nGetUserRepositoryFork takes an ACK repository name and tries to find it fork in the user public repositories.\n\n```go\nfunc (c *Client) ListRepositoryForks(ctx context.Context, repoName string) ([]*github.Repository, error)\n```\nListRepositoryForks list the forks of a given repository in the ACK organisation. It returns a list fork information which includes the owner and the fork name (forkInfo).\n\n```go\nfunc (c *Client) RenameRepository(ctx context.Context, owner, name, newName string) error\n```\nRenameRepository renames a Github repository. The request should have admin access on the target repositories to be able to rename it.\n\n```go\ntype RepositoryService interface {\n\tForkRepository(ctx context.Context, repoName string) error\n\tRenameRepository(ctx context.Context, owner, name, newName string) error\n\tGetRepository(ctx context.Context, owner, repoName string) (*github.Repository, error)\n\tListRepositoryForks(ctx context.Context, repoName string) ([]*github.Repository, error)\n\tGetUserRepositoryFork(ctx context.Context, owner, repoName string) (*github.Repository, error)\n}\n```\nRepositoryService is the interface implemented by the Github client wrapper. It exposes functionalities to simplify the interactions with the repository endpoint of Github APIv3\n\n","path":"github.com/aws-controllers-k8s/dev-tools/pkg/github","name":"github","synopsis":"","isRedistributable":true}
