github

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 with additional methods

func NewClient

func NewClient(cfg *Config) (*Client, error)

NewClient creates a new GitHub Client

func (*Client) GetCurrentUser

func (c *Client) GetCurrentUser(ctx context.Context) (*github.User, error)

GetCurrentUser gets the current authenticated user's information

func (*Client) GetOrg

func (c *Client) GetOrg(ctx context.Context, org string) (*github.Organization, error)

GetOrg gets a single organization's information

func (*Client) GetRepo

func (c *Client) GetRepo(ctx context.Context, owner, repo string) (*github.Repository, error)

GetRepo gets a single repository's information

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, username string) (*github.User, error)

GetUser gets a user's information by username

func (*Client) GetUserPermissionFromOrg

func (c *Client) GetUserPermissionFromOrg(ctx context.Context, org, username string) (string, error)

GetUserPermissionFromOrg gets a user's permission level in an organization

func (*Client) GetUserPermissionFromRepo

func (c *Client) GetUserPermissionFromRepo(ctx context.Context, owner, repo, username string) (string, error)

GetUserPermissionFromRepo gets a user's permission level for a repository

func (*Client) ListOrgActionsVariables added in v0.2.0

func (c *Client) ListOrgActionsVariables(ctx context.Context, org string) ([]*github.ActionsVariable, error)

ListOrgActionsVariables lists all GitHub Actions variables at the organization level.

func (*Client) ListOrgRepos

func (c *Client) ListOrgRepos(ctx context.Context, org string) ([]*github.Repository, error)

ListOrgRepos lists all repositories in an organization using paginatedFetch

func (*Client) ListOrgTeams

func (c *Client) ListOrgTeams(ctx context.Context, org string) ([]*github.Team, error)

ListOrgTeams lists all teams in an organization permission can be one of: "pull", "triage", "push", "maintain", "admin"

func (*Client) ListOrgTeamsMembers

func (c *Client) ListOrgTeamsMembers(ctx context.Context, org string, slug string) ([]*github.User, error)

ListOrgTeamsMembers lists all members in a team using paginatedFetch

func (*Client) ListOrgUsers

func (c *Client) ListOrgUsers(ctx context.Context, org string) ([]*github.User, error)

ListOrgUsers lists all members in an organization using paginatedFetch

func (*Client) ListRepoActionsVariables added in v0.2.0

func (c *Client) ListRepoActionsVariables(ctx context.Context, owner, repo string) ([]*github.ActionsVariable, error)

ListRepoActionsVariables lists all GitHub Actions variables at the repository level.

func (*Client) ListRepoCollaborators

func (c *Client) ListRepoCollaborators(ctx context.Context, owner, repo string) ([]*github.User, error)

ListRepoCollaborators lists all collaborators in a repository. This is now implemented using paginatedFetch.

func (*Client) ListTeamReposBySlug

func (c *Client) ListTeamReposBySlug(ctx context.Context, org string, slug string) ([]*github.Repository, error)

ListTeamReposBySlug lists all repositories a team has access to using team slug and paginatedFetch

func (*Client) ListUserKeys

func (c *Client) ListUserKeys(ctx context.Context, username string) ([]*github.Key, error)

ListUserKeys lists all public keys for a user using paginatedFetch

type Config

type Config struct {
	Server     string
	Token      string
	SkipVerify bool
	Logger     *slog.Logger
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL