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

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

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:

shortnamefullnamedefaultdescription
-r--revrevision to link

remove a commit's association with a GitHub pull request

shortnamefullnamedefaultdescription
-r--revrevisions to unlink

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

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 (default 30)
-S--searchsearch pull requests with query
-s--statefilter by state: {open
-t--templateformat JSON output using a Go template; see "gh help formatting"
-w--webfalselist pull requests in the web browser