Expand description
Utility functions for parsing and working with GitHub CLI output and other utility functions.
Functions§
- canonicalize_
repo_ url - Canonicalize a repository URL to the form
https://{host}/{repo} - ensure_
https_ prefix - Add https:// to a URL if it is not already present
- 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
- issue_
text_ similarity - Calculate the smallest levenshtein distance between an issue body and other issue bodies
- remove_
ansi_ codes - Remove ANSI codes from a string
- remove_
non_ ascii - Remove non-ASCII characters from a string
- remove_
timestamp_ prefixes - Parse a log and remove line-prefixed timestamps in the format
YYYY-MM-DDTHH:MM:SS.0000000Z(ISO 8601). - remove_
timestamps_ and_ ids - Parse text for timestamps and IDs and remove them, returning the modified text without making a copy.
- repo_
to_ owner_ repo_ fragments - Parse a repository URL/identifier to owner and repo fragments
- take_
lines_ with_ failed_ jobs - Take the lines with failed jobs from the output of
gh run view