Skip to main content

Module github

Module github 

Source

Structs§

CheckRun
GitHubClient
PrRef
A PR found by searching for an existing head branch (find_open_pr_for_branch), independent of any metadata the gh wrapper hook may or may not have recorded.
PrStatus
ReviewThread

Traits§

GithubApi

Functions§

candidate_repos
Every configured git remote’s GitHub repo slug (owner/repo) for workspace, origin first (the common case, tried with no extra requests) then any other remote in git remote order. Repos here routinely carry a personal origin alongside an internal mirror remote — PR detection must not assume a PR always lives against origin. Returns an empty Vec if workspace isn’t a git repo or has no remotes.
current_branch
The branch currently checked out in workspace. None on detached HEAD or if workspace isn’t a git repo.
resolve_token
Resolve GitHub token: config value → GITHUB_TOKEN env → gh auth token.
split_repo
Parse a git remote URL or bare slug into (owner, repo). Handles “owner/repo”, “https://github.com/owner/repo(.git)”, “ssh://[user@]host/owner/repo(.git)”, and scp-like SSH syntax “[user@]host:owner/repo(.git)” — including a custom ssh config host alias (e.g. git@github.com-work:owner/repo.git), which multi-remote setups (a personal origin alongside an internal mirror reached via an aliased SSH host) rely on and which a fixed github.com prefix can’t recognize.