Skip to main content

Module pr

Module pr 

Source

Structs§

CliLookup
Looks pull requests up with the gh and az command-line tools, using whatever account they are logged in with.
PrRefs
The refs to fetch for a pull request, as full ref names on the remote.
PullRequest

Enums§

Repo
A repository on a hosting service.

Traits§

PrLookup
Asks the hosting service which branches a pull request compares.

Functions§

parse_pr_url
Parses a pull-request URL from GitHub or Azure DevOps.
parse_remote_url
Parses a git remote URL that points at GitHub or Azure DevOps.
pr_number
The PR number a pr target names, for labels: from a URL or a bare number.
resolve
Turns a PR URL or number into a range: fetches the PR’s base and head into refs/declutter/pr/<n>/ (so no local branch is touched) and compares the head against its merge base with the base, as the PR page does. The host’s CLI is only asked when the remote publishes no merge ref for the PR.