Skip to main content

Crate ytil_gh

Crate ytil_gh 

Source
Expand description

Lightweight GitHub helpers using the gh CLI.

Modulesยง

issue
pr

Enumsยง

RepoViewField
Repository fields available for querying via gh repo view.

Constantsยง

GITHUB_HOST ๐Ÿ”’
The GitHub host domain.
GITHUB_PR_ID_PREFIX ๐Ÿ”’
The URL path segment prefix for pull requests.
GITHUB_PR_ID_QUERY_KEY ๐Ÿ”’
The query parameter key used for pull request IDs in GitHub Actions URLs.

Functionsยง

extract_pr_id_form_url ๐Ÿ”’
Extracts the pull request numeric ID from a GitHub URL.
get_branch_name_from_url
Extracts the branch name from a GitHub pull request Url.
get_latest_release
Retrieves the latest release tag name for the specified GitHub repository.
get_repo_urls
Returns all GitHub remote URLs for the repository rooted at repo_path.
get_repo_view_field
Return the specified repository field via gh repo view.
log_into_github
Ensures the user is authenticated with the GitHub CLI.
parse_github_url_from_git_remote_url ๐Ÿ”’
Converts a Git remote URL (SSH or HTTPS) to a canonical GitHub HTTPS URL without the .git suffix.