Module util

Source
Expand description

Utility functions for parsing and working with GitHub CLI output and other utility functions.

Functions§

bzip2_compress
bzip2_decompress
canonicalize_repo_url
Canonicalize a repository URL to the form https://{host}/{repo}
check_gh_cli_version
Retrieve the GitHub CLI version from the GitHub CLI binary and check that it meets version requirements.
check_gh_cli_version_str
Check that the GitHub CLI version meets version requirements from the string output of gh --version
first_abs_path_from_str
Parse an absolute path from a string. This assumes that the the first ‘/’ found in the string is the start of the path.
first_path_from_str
Parse a path from a string
id_from_job_lines
Extract the job IDs from the lines with job information
remove_timestamps
Parse text for timestamps and IDs and remove them, returning the modified text without making a copy.
set_linux_file_permissions
Set the file permissions for a file on Linux
take_lines_with_failed_jobs
Take the lines with failed jobs from the output of gh run view