提交 2eb3056a 编写于 作者: J Johan Walles

Rename "review"->"pr"

The current functionality should really be moved to "hub pr checkout".
This is a step on the way.
上级 dc7abb5c
......@@ -8,7 +8,7 @@ HELP_CMD = \
share/man/man1/hub-compare.1 \
share/man/man1/hub-create.1 \
share/man/man1/hub-fork.1 \
share/man/man1/hub-review.1 \
share/man/man1/hub-pr.1 \
share/man/man1/hub-pull-request.1 \
share/man/man1/hub-release.1 \
share/man/man1/hub-issue.1 \
......
......@@ -166,7 +166,7 @@ var helpText = `
These GitHub commands are provided by hub:
pull-request Open a pull request on GitHub
review Get the source code for a pull request
pr Work with pull requests
fork Make a fork of a remote repository on GitHub and add as remote
create Create this repository on GitHub and add GitHub as origin
browse Open a GitHub page in the default browser
......
......@@ -8,27 +8,27 @@ import (
"github.com/github/hub/utils"
)
var cmdReview = &Command{
Run: review,
Usage: "review <PULLREQ-NUMBER> [<BRANCH>]",
var cmdPr = &Command{
Run: pr,
Usage: "pr <PULLREQ-NUMBER> [<BRANCH>]",
Long: `Check out the head of a pull request as a local branch.
## Examples:
$ hub review 73
$ hub pr 73
> git fetch origin pull/73/head:jingweno-feature
> git checkout jingweno-feature
## See also:
hub-merge(1), hub-am(1), hub(1), git-checkout(1)
hub-merge(1), hub(1), hub-checkout(1)
`,
}
func init() {
CmdRunner.Use(cmdReview)
CmdRunner.Use(cmdPr)
}
func review(command *Command, args *Args) {
func pr(command *Command, args *Args) {
if args.ParamsSize() < 1 || args.ParamsSize() > 2 {
utils.Check(fmt.Errorf("Error: Expected one or two arguments, got %d", args.ParamsSize()))
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册