Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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.