提交 903c8d7c 编写于 作者: J Jingwen Owen Ou

Rename commands wit unhyphennated words

上级 e09b2caa
......@@ -8,9 +8,9 @@ import (
"os"
)
var cmdCiStatus = &Command{
Run: ciStatus,
Usage: "ci-status [COMMIT]",
var cmdCi = &Command{
Run: ci,
Usage: "ci [COMMIT]",
Short: "Show CI status of a commit",
Long: `Looks up the SHA for COMMIT in GitHub Status API and displays the latest
status. If no COMMIT is provided, HEAD will be used. Exits with one of:
......@@ -19,7 +19,7 @@ success (0), error (1), failure (1), pending (2), no status (3)
`,
}
func ciStatus(cmd *Command, args []string) {
func ci(cmd *Command, args []string) {
ref := "HEAD"
if len(args) > 0 {
ref = args[0]
......
......@@ -40,8 +40,8 @@ func (c *Command) List() bool {
}
var All = []*Command{
cmdPullRequest,
cmdCiStatus,
cmdPull,
cmdCi,
cmdBrowse,
cmdCompare,
cmdHelp,
......
......@@ -14,9 +14,9 @@ import (
"strings"
)
var cmdPullRequest = &Command{
Run: pullRequest,
Usage: "pull-request [-f] [TITLE|-i ISSUE] [-b BASE] [-h HEAD]",
var cmdPull = &Command{
Run: pull,
Usage: "pull [-f] [TITLE|-i ISSUE] [-b BASE] [-h HEAD]",
Short: "Open a pull request on GitHub",
Long: `Opens a pull request on GitHub for the project that the "origin" remote
points to. The default head of the pull request is the current branch.
......@@ -38,12 +38,12 @@ of title you can paste a full URL to an issue on GitHub.
var flagPullRequestBase, flagPullRequestHead, flagPullRequestIssue string
func init() {
cmdPullRequest.Flag.StringVar(&flagPullRequestBase, "b", "master", "BASE")
cmdPullRequest.Flag.StringVar(&flagPullRequestHead, "h", "", "HEAD")
cmdPullRequest.Flag.StringVar(&flagPullRequestIssue, "i", "", "ISSUE")
cmdPull.Flag.StringVar(&flagPullRequestBase, "b", "master", "BASE")
cmdPull.Flag.StringVar(&flagPullRequestHead, "h", "", "HEAD")
cmdPull.Flag.StringVar(&flagPullRequestIssue, "i", "", "ISSUE")
}
func pullRequest(cmd *Command, args []string) {
func pull(cmd *Command, args []string) {
var title, body string
if len(args) == 1 {
title = args[0]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册