Expand description
Naming a PR: a number, a URL, owner/repo#123 or a branch, and the
repository a bare number or branch belongs to.
A repository is on GitHub unless it names a host: gitlab.com/group/sub/project,
codeberg.org/owner/repo, or the host of the checkout’s remote. On
GitLab the owner is a group path and can hold slashes, so a repository
is split at its last /, never its first.
Structs§
Enums§
- Arg
- A PR argument as written, before a repository is chosen for it.
- Target
- A PR to look up, with its repository settled.
Functions§
- current_
branch - The branch checked out in this directory, if any.
- pick_
remote - The repository named by
git config --get-regexp '^remote\..*\.(url|gh-resolved)$'output, chosen asrepo_from_gitchooses, for a caller that ran git in another directory. - repo_
from_ git - The repository of this checkout’s remotes, on any forge jouet knows,
chosen in the order gh uses: a remote marked by
gh repo set-default, thenupstream,github,origin, then the rest as git lists them, with GitHub remotes before those on other forges.