api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRepo

func ParseRepo(slug string) (owner, repo string, err error)

func ValidateToken

func ValidateToken(token string) (string, error)

ValidateToken checks if a token is valid and returns the authenticated username.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c *cache.Cache) *Client

func (*Client) CheckPathExists

func (c *Client) CheckPathExists(ctx context.Context, owner, repo, path string) bool

CheckPathExists returns true if the given path exists in the repository (file or directory).

func (*Client) CountOpenPRs

func (c *Client) CountOpenPRs(ctx context.Context, owner, repo string) (int, error)

func (*Client) GetCommitActivity

func (c *Client) GetCommitActivity(ctx context.Context, owner, repo string) ([]int, error)

func (*Client) GetCommunityProfile

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

func (*Client) GetContributorStats

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

func (*Client) GetFileContents

func (c *Client) GetFileContents(ctx context.Context, owner, repo, path string) (string, error)

func (*Client) GetLanguages

func (c *Client) GetLanguages(ctx context.Context, owner, repo string) (map[string]int, error)

func (*Client) GetRecentCommitTimes

func (c *Client) GetRecentCommitTimes(ctx context.Context, owner, repo string, pages int) ([]time.Time, error)

func (*Client) GetRecentStargazers

func (c *Client) GetRecentStargazers(ctx context.Context, owner, repo string, totalStars int) ([]*github.Stargazer, error)

GetRecentStargazers fetches the most recently added stargazers by requesting the last page of the stargazer list, given the total star count.

func (*Client) GetRepo

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

func (*Client) GetUserLocation

func (c *Client) GetUserLocation(ctx context.Context, login string) (string, error)

func (*Client) ListActiveForks

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

func (*Client) ListContributors

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

func (*Client) ListLabels

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

func (*Client) ListOpenIssues

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

func (*Client) ListRecentClosedIssues

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

func (*Client) ListRecentPRs

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

func (*Client) ListReleases

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

func (*Client) ListStargazers

func (c *Client) ListStargazers(ctx context.Context, owner, repo string, maxPages int) ([]*github.Stargazer, error)

Jump to

Keyboard shortcuts

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