Documentation
¶
Overview ¶
Package admin provides GitHub administrative operations for repository and collaborator management.
Index ¶
- type Client
- func (c *Client) AcceptInvitation(ctx context.Context, invitationID int64) error
- func (c *Client) AddCollaborator(ctx context.Context, owner, repo, username, permission string) (*github.CollaboratorInvitation, error)
- func (c *Client) AddRepositoryTeam(ctx context.Context, owner, repo string, teamID int64, permission string) error
- func (c *Client) ArchiveRepository(ctx context.Context, owner, repo string) (*github.Repository, error)
- func (c *Client) CancelInvitation(ctx context.Context, owner, repo string, invitationID int64) error
- func (c *Client) CheckCollaborator(ctx context.Context, owner, repo, username string) (bool, error)
- func (c *Client) CreateWebhook(ctx context.Context, owner, repo string, config map[string]interface{}) (*github.Hook, error)
- func (c *Client) DeleteBranchProtection(ctx context.Context, owner, repo, branch string) error
- func (c *Client) DeleteRepository(ctx context.Context, owner, repo string) error
- func (c *Client) DeleteWebhook(ctx context.Context, owner, repo string, hookID int64) error
- func (c *Client) GetBranchProtection(ctx context.Context, owner, repo, branch string) (*github.Protection, error)
- func (c *Client) GetRepositorySettings(ctx context.Context, owner, repo string) (*github.Repository, error)
- func (c *Client) ListCollaborators(ctx context.Context, owner, repo string) ([]*github.User, error)
- func (c *Client) ListInvitations(ctx context.Context, owner, repo string) ([]*github.RepositoryInvitation, error)
- func (c *Client) ListRepositoryTeams(ctx context.Context, owner, repo string) ([]*github.Team, error)
- func (c *Client) ListWebhooks(ctx context.Context, owner, repo string) ([]*github.Hook, error)
- func (c *Client) RemoveCollaborator(ctx context.Context, owner, repo, username string) error
- func (c *Client) TestWebhook(ctx context.Context, owner, repo string, hookID int64) error
- func (c *Client) UpdateBranchProtection(ctx context.Context, owner, repo, branch string, ...) (*github.Protection, error)
- func (c *Client) UpdateCollaboratorPermission(ctx context.Context, owner, repo, username, permission string) (*github.CollaboratorInvitation, error)
- func (c *Client) UpdateRepositorySettings(ctx context.Context, owner, repo string, settings map[string]interface{}) (*github.Repository, error)
- func (c *Client) UpdateWebhook(ctx context.Context, owner, repo string, hookID int64, ...) (*github.Hook, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the GitHub client for administrative operations
func (*Client) AcceptInvitation ¶
AcceptInvitation accepts a repository invitation
func (*Client) AddCollaborator ¶
func (c *Client) AddCollaborator(ctx context.Context, owner, repo, username, permission string) (*github.CollaboratorInvitation, error)
AddCollaborator invites a user as a collaborator
func (*Client) AddRepositoryTeam ¶
func (c *Client) AddRepositoryTeam(ctx context.Context, owner, repo string, teamID int64, permission string) error
AddRepositoryTeam grants a team access to a repository
func (*Client) ArchiveRepository ¶
func (c *Client) ArchiveRepository(ctx context.Context, owner, repo string) (*github.Repository, error)
ArchiveRepository archives a repository (makes it read-only)
func (*Client) CancelInvitation ¶
func (c *Client) CancelInvitation(ctx context.Context, owner, repo string, invitationID int64) error
CancelInvitation declines or cancels a repository invitation
func (*Client) CheckCollaborator ¶
CheckCollaborator checks if a user is a collaborator
func (*Client) CreateWebhook ¶
func (c *Client) CreateWebhook(ctx context.Context, owner, repo string, config map[string]interface{}) (*github.Hook, error)
CreateWebhook creates a new repository webhook
func (*Client) DeleteBranchProtection ¶
DeleteBranchProtection removes branch protection
func (*Client) DeleteRepository ¶
DeleteRepository permanently deletes a repository
func (*Client) DeleteWebhook ¶
DeleteWebhook deletes a repository webhook
func (*Client) GetBranchProtection ¶
func (c *Client) GetBranchProtection(ctx context.Context, owner, repo, branch string) (*github.Protection, error)
GetBranchProtection retrieves branch protection rules
func (*Client) GetRepositorySettings ¶
func (c *Client) GetRepositorySettings(ctx context.Context, owner, repo string) (*github.Repository, error)
GetRepositorySettings retrieves repository configuration
func (*Client) ListCollaborators ¶
ListCollaborators lists all repository collaborators
func (*Client) ListInvitations ¶
func (c *Client) ListInvitations(ctx context.Context, owner, repo string) ([]*github.RepositoryInvitation, error)
ListInvitations lists pending repository invitations
func (*Client) ListRepositoryTeams ¶
func (c *Client) ListRepositoryTeams(ctx context.Context, owner, repo string) ([]*github.Team, error)
ListRepositoryTeams lists teams with access to a repository
func (*Client) ListWebhooks ¶
ListWebhooks lists all repository webhooks
func (*Client) RemoveCollaborator ¶
RemoveCollaborator removes a user's access to a repository
func (*Client) TestWebhook ¶
TestWebhook triggers a test delivery for a webhook
func (*Client) UpdateBranchProtection ¶
func (c *Client) UpdateBranchProtection(ctx context.Context, owner, repo, branch string, protection *github.ProtectionRequest) (*github.Protection, error)
UpdateBranchProtection configures branch protection rules
func (*Client) UpdateCollaboratorPermission ¶
func (c *Client) UpdateCollaboratorPermission(ctx context.Context, owner, repo, username, permission string) (*github.CollaboratorInvitation, error)
UpdateCollaboratorPermission updates a collaborator's permission level
func (*Client) UpdateRepositorySettings ¶
func (c *Client) UpdateRepositorySettings(ctx context.Context, owner, repo string, settings map[string]interface{}) (*github.Repository, error)
UpdateRepositorySettings modifies repository configuration