lib

package
v1.0.45 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLabelsToRepository

func AddLabelsToRepository(owner, repo string, labels []string) error

func ExtractCommitHash

func ExtractCommitHash(releaseBody string) string

ExtractCommitHash attempts to extract the commit hash from the release body

func FetchGitHubRepositories

func FetchGitHubRepositories(owner string) ([]string, error)

func GetRepositories

func GetRepositories(scm, owner string) ([]string, error)

Types

type GitHubRelease

type GitHubRelease struct {
	TagName     string    `json:"tag_name"`
	PublishedAt time.Time `json:"published_at"`
	Body        string    `json:"body"`
}

GitHubRelease represents the structure of a GitHub release

func GetLatestGitHubRelease

func GetLatestGitHubRelease(owner, repo string) (*GitHubRelease, error)

GetLatestGitHubRelease fetches the latest release information from GitHub

type GitspaceCatalog

type GitspaceCatalog struct {
	Catalog struct {
		Name        string `toml:"name"`
		Description string `toml:"description"`
		Version     string `toml:"version"`
		LastUpdated struct {
			Date       string `toml:"date"`
			CommitHash string `toml:"commit_hash"`
		} `toml:"last_updated"`
	} `toml:"catalog"`
	Plugins   map[string]Plugin   `toml:"plugins"`
	Templates map[string]Template `toml:"templates"`
}

GitspaceCatalog represents the structure of the gitspace-catalog.toml file

func FetchGitspaceCatalog

func FetchGitspaceCatalog(owner, repo string) (*GitspaceCatalog, error)

FetchGitspaceCatalog fetches the gitspace-catalog.toml file from the specified repository

type Plugin

type Plugin struct {
	Version     string `toml:"version"`
	Description string `toml:"description"`
	Path        string `toml:"path"`
	Repository  struct {
		Type string `toml:"type"`
		URL  string `toml:"url"`
	} `toml:"repository"`
}

type Template

type Template struct {
	Version     string `toml:"version,omitempty"`
	Description string `toml:"description,omitempty"`
	Path        string `toml:"path"`
	Repository  struct {
		Type string `toml:"type"`
		URL  string `toml:"url"`
	} `toml:"repository"`
}

Jump to

Keyboard shortcuts

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