Skip to main content

pr

pr

exchange local commit data with GitHub pull requests

subcommands

s|submit

create or update GitHub pull requests from local commits

Commit(s) will be pushed to default-push, if configured, else default (see sl help urls and sl help path).

Pull request(s) will be created against default. If default is a fork, they will be created against default's upstream repository.

Returns 0 on success.

shortnamefullnamedefaultdescription
-s--stackfalsealso include draft ancestors
-m--messagemessage describing changes to updated commits
-d--draftfalsemark new pull requests as draft

pull

import a pull request into your working copy

The PULL_REQUEST can be specified as either a URL: https://github.com/facebook/sapling/pull/321 or just the PR number within the GitHub repository identified by sl config paths.default.

shortnamefullnamedefaultdescription
-g--gotofalsegoto the pull request after importing it

identify a commit as the head of a GitHub pull request

A PULL_REQUEST can be specified in a number of formats:

  • GitHub URL to the PR: facebook/react#42

  • Integer: Number for the PR. Uses 'paths.upstream' as the target repo, if specified; otherwise, falls back to 'paths.default'.

shortnamefullnamedefaultdescription
-r--revrevision to link

remove a commit's association with a GitHub pull request

shortnamefullnamedefaultdescription
-r--revrevisions to unlink

follow

join the nearest desecendant's pull request

Marks commits to become part of their nearest desecendant's pull request instead of starting as the head of a new pull request.

Use pr unlink to undo.

shortnamefullnamedefaultdescription
-r--revrevisions to follow the next pull request

list

calls gh pr list [flags] with the current repo as the value of --repo

shortnamefullnamedefaultdescription
--appfilter by GitHub App author
-a--assigneefilter by assignee
-A--authorfilter by author
-B--basefilter by base branch
-d--draftfalsefilter by draft state
-H--headfilter by head branch
-q--jqfilter JSON output using a jq expression
--jsonoutput JSON with the specified fields
-l--labelfilter by label
-L--limit30maximum number of items to fetch
-S--searchsearch pull requests with query
-s--state"open"filter by state: open, closed, merged, all
-t--templateformat JSON output using a Go template; see "gh help formatting"
-w--webfalselist pull requests in the web browser