github

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 is a wrapper around the GitHub API client

func NewClient

func NewClient(token string) (*Client, error)

NewClient creates a new GitHub client with the provided token

func (*Client) GetForkedRepositories

func (c *Client) GetForkedRepositories(ctx context.Context) ([]Repository, error)

GetForkedRepositories returns a list of repositories that are forks

func (*Client) IsRepositoryBehindUpstream

func (c *Client) IsRepositoryBehindUpstream(ctx context.Context, repo Repository) (bool, int, error)

IsRepositoryBehindUpstream checks if a forked repository is behind its upstream

func (*Client) SyncRepositoryWithUpstream

func (c *Client) SyncRepositoryWithUpstream(ctx context.Context, repo Repository) error

SyncRepositoryWithUpstream syncs a forked repository with its upstream

type Repository

type Repository struct {
	Owner       string
	Name        string
	FullName    string
	ParentOwner string
	ParentName  string
}

Repository represents a GitHub repository

Jump to

Keyboard shortcuts

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