Skip to main content

Module target

Module target 

Source
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§

Repo

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 as repo_from_git chooses, 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, then upstream, github, origin, then the rest as git lists them, with GitHub remotes before those on other forges.