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: 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 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