Documentation ¶
Overview ¶
Package release contains methods that interact with releases from VCS providers that do not exist natively in git. For example, Github Releases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fetch ¶
func Fetch(ctx context.Context, token cfg.SecretData, opts *FetchOptions) (io.ReadCloser, string, int64, error)
Fetch fetches a release from a VCS provider and returns an asset from it as an io.ReadCloser. This must be closed to close the underlying HTTP request.
func GetReleaseNotes ¶
func GetReleaseNotes(ctx context.Context, token cfg.SecretData, opts *GetReleaseNoteOptions) (string, error)
GetReleaseNotes fetches the release notes of a release from a VCS provider.
Types ¶
type FetchOptions ¶
type FetchOptions struct { // RepoURL is the repository URL, it should be a valid // URL. RepoURL string // Tag is the tag of the release Tag string // AssetName is the name of the asset to fetch, globs are // supported. AssetName string // AssetNames is a list of asset names to fetch, the first // asset that matches will be returned. Globs are supported. AssetNames []string }
FetchOptions is a set of options for Fetch
type GetReleaseNoteOptions ¶
type GetReleaseNoteOptions struct { // RepoURL is the repository URL, it should be a valid // URL. RepoURL string // Tag is the tag of the release Tag string }
GetReleaseNoteOptions is a set of options for GetReleaseNotes
Click to show internal directories.
Click to hide internal directories.