githubutil

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetBaseURLForTesting added in v0.15.0

func SetBaseURLForTesting(url string) func()

SetBaseURLForTesting overrides the GitHub API base URL. Only for use in tests.

Types

type Asset

type Asset struct {
	BrowserDownloadURL string `json:"browser_download_url"`
	// Rest stores all other fields we don't explicitly need
	Rest map[string]any `json:"-"`
}

Asset represents a minimal GitHub release asset

type Release

type Release struct {
	TagName string  `json:"tag_name"`
	Assets  []Asset `json:"assets"`
	// Rest stores all other fields we don't explicitly need
	Rest map[string]any `json:"-"`
}

Release represents a minimal GitHub release with only the fields we need

func FetchLatestRelease

func FetchLatestRelease(organization string, repository string) (*Release, error)

FetchLatestRelease fetches the latest release from a GitHub repository

func FetchReleases

func FetchReleases(organization string, repository string) ([]*Release, error)

FetchReleases fetches all releases from a GitHub repository

Jump to

Keyboard shortcuts

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