github

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRepository

func ParseRepository(repository string) (owner, repo string, err error)

ParseRepository splits a repository string (owner/repo) into owner and repo

Types

type Client

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

Client wraps the GitHub API client

func NewClient

func NewClient(token string) *Client

NewClient creates a new GitHub API client with the provided token

func (*Client) GetLatestRelease

func (c *Client) GetLatestRelease(owner, repo string) (*Release, error)

GetLatestRelease fetches the latest release for a repository

func (*Client) GetReleaseTag

func (c *Client) GetReleaseTag(owner, repo string) (string, error)

GetReleaseTag fetches just the tag name of the latest release

type Release

type Release struct {
	Repository  string `json:"repository"`
	TagName     string `json:"tag_name"`
	Name        string `json:"name"`
	HTMLURL     string `json:"html_url"`
	PublishedAt string `json:"published_at"`
}

Release represents a GitHub release

Jump to

Keyboard shortcuts

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