github package - actionlint.kjanat.dev/v2/internal/input/references/github - Go Packages
Documentation ¶ Overview ¶ Package github downloads action and reusable-workflow metadata using the configured network mode, credentials and cache directory. Index ¶ type GitHub func New(options Options) (*GitHub, error) func (g *GitHub) Lookup(ctx context.Context, ref actions.Reference) (actions.Manifest, error) func (g *GitHub) LookupWorkflow(ctx context.Context, spec string) (reusableworkflows.RemoteFile, error) func (g *GitHub) Open(ctx context.Context, request references.Request) (references.RepositorySession, error) func (g *GitHub) ResolverEnabled() bool func (g *GitHub) WithMetadataMirrors(access references.MirrorAccess, excludedRepositories []string) actions.Provider func (g *GitHub) WithResolver(resolver references.Resolver) actions.Provider func (g *GitHub) WithWorkflowMetadataMirrors(access references.MirrorAccess, excludedRepositories []string) reusableworkflows.Provider type Mode type Options func EnvironmentOptions(mode Mode, env func(string) string, cacheDirectory string) Options Constants ¶ This section is empty.
Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type GitHub ¶ type GitHub struct { // contains filtered or unexported fields } func New ¶ func New(options Options ) (* GitHub , error ) func (*GitHub) Lookup ¶ func (g * GitHub ) Lookup(ctx context . Context , ref actions . Reference ) ( actions . Manifest , error ) Lookup natively acquires only full SHA-1 commit requests. Named refs require an injected action-profile resolver; the commits API never selects their ref. func (*GitHub) LookupWorkflow ¶ func (g * GitHub ) LookupWorkflow(ctx context .
Context , spec string ) ( reusableworkflows . RemoteFile , error ) LookupWorkflow uses workflow reference selection and the same HTTP client, request accounting and immutable cache checks as action metadata. func (*GitHub) Open ¶ func (g * GitHub ) Open(ctx context . Context , request references . Request ) ( references . RepositorySession , error ) Open checks repository identity and read access before resolving references. func (*GitHub) ResolverEnabled ¶ func (g * GitHub ) ResolverEnabled() bool func (*GitHub) WithMetadataMirrors ¶ func (g * GitHub ) WithMetadataMirrors(access references .
MirrorAccess , excludedRepositories [] string ) actions . Provider func (*GitHub) WithResolver ¶ func (g * GitHub ) WithResolver(resolver references . Resolver ) actions . Provider WithResolver uses the analysis session's resolver for action and workflow lookups. func (*GitHub) WithWorkflowMetadataMirrors ¶ func (g * GitHub ) WithWorkflowMetadataMirrors(access references . MirrorAccess , excludedRepositories [] string ) reusableworkflows .
Provider type Mode ¶ type Mode string const ( Off Mode = "off" Offline Mode = "offline" Online Mode = "online" ) type Options ¶ type Options struct { Mode Mode CacheDir string Token string Resolver func() references . Resolver Transport http . RoundTripper Mirrors references . MirrorAccess } Options selects acquisition explicitly. Tokens are never cached or included in returned failures. A supplied resolver must retain action selection routes. func EnvironmentOptions ¶ func EnvironmentOptions(mode Mode , env func( string ) string , cacheDirectory string ) Options EnvironmentOptions uses actionlint's cache directory and the user's GitHub credentials for metadata lookups.
An empty cacheDirectory disables the metadata cache. Source Files ¶ View all Source files environment.go github.go mirrors.go named_cache.go raw_files.go ref_listing.go repository_file.go resolver.go resolver_objects.go Click to show internal directories. Click to hide internal directories. go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. Learn more.