github

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package github provides a client for querying the GitHub API, primarily to check repository metadata such as archive status.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseGitHubRemote

func ParseGitHubRemote(url string) (owner, repo string, ok bool)

ParseGitHubRemote extracts owner and repo from a GitHub remote URL. Supports both SSH (git@github.com:owner/repo.git) and HTTPS (https://github.com/owner/repo.git) formats.

Types

type Client

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

Client wraps GitHub API access.

func NewClient

func NewClient(token string) *Client

NewClient creates a GitHub client. It attempts to use authentication from the gh CLI config, falling back to the provided token, falling back to unauthenticated access.

func (*Client) IsArchived

func (c *Client) IsArchived(owner, repo string) (bool, error)

IsArchived checks if a repository is archived on GitHub.

Jump to

Keyboard shortcuts

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