cmd

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 15 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
	Update  bool   // Whether to update SHAs
	Clear   bool   // Whether to clear cache
	Logger  *log.Logger
)

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, allows for cancellation/timeouts. - client: The initialized GitHub client for making API requests. - filePath: The path to the workflow file to process.

Returns:

  • int: The number of actions updated in the file
  • error: 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