network

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchOrTag

type BranchOrTag struct {
	Name   string `json:"name"`
	Commit Commit `json:"commit"`
}

func GetRefList

func GetRefList(action string) ([]BranchOrTag, error)

GetRefList takes an action and returns a list of matching tags

type Commit

type Commit struct {
	Sha string `json:"sha"`
	URL string `json:"url"`
}

type Resolver

type Resolver interface {
	// Resolve checks if SHA is available for a given version of GitHub action
	Resolve(action string) (string, error)
}

Resolver is a converter for action@version to a SHA string

type SHAResolver

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

SHAResolver resolves a given action to it's safe SHA commit

func NewSHAResolver

func NewSHAResolver() *SHAResolver

func (*SHAResolver) Resolve

func (s *SHAResolver) Resolve(action string) (string, error)

Resolve fetches list of tags for a given GitHub action and picks SHA commit

Jump to

Keyboard shortcuts

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