Skip to main content

has_github_remote

Function has_github_remote 

Source
pub fn has_github_remote(repo: &Repository) -> bool
Expand description

True if any of the repository’s remotes point at github.com.

gh can only resolve a PR against a GitHub remote, so callers use this to skip a lookup that is guaranteed to fail (e.g. prune’s PR-merged signal). Handles both URL forms (https://github.com/... and git@github.com:...); a remote whose URL fails to parse is treated as non-GitHub rather than an error.