cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version string // Application version
	Date    string // Build date
	Commit  string // Git commit hash
	BuiltBy string // Builder identifier
)

Variables to hold build information, populated at build time.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Returns: Does not return a value, but exits the program with status code 1 if an error occurs.

func UpdateWorkflowActionSHAs

func UpdateWorkflowActionSHAs(
	ctx context.Context,
	client *github.Client,
	filePath string,
) (int, error)

UpdateWorkflowActionSHAs reads a workflow file, parses its YAML structure, identifies GitHub Actions needing SHA pinning, resolves the SHAs, and modifies the file content in memory before writing it back.

- ctx: The context for API calls. - client: The initialized GitHub client. - filePath: The path to the workflow file to process. Returns: The number of actions updated in the file, and an error if reading, parsing,

resolving, or writing fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

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