Rename to cli/cli
This commit is contained in:
parent
11bfa658fb
commit
a710893fc1
33 changed files with 75 additions and 75 deletions
|
|
@ -10,9 +10,9 @@ builds:
|
|||
- binary: bin/gh
|
||||
main: ./cmd/gh
|
||||
ldflags:
|
||||
- -s -w -X github.com/github/gh-cli/command.Version={{.Version}} -X github.com/github/gh-cli/command.BuildDate={{time "2006-01-02"}}
|
||||
- -X github.com/github/gh-cli/context.oauthClientID={{.Env.GH_OAUTH_CLIENT_ID}}
|
||||
- -X github.com/github/gh-cli/context.oauthClientSecret={{.Env.GH_OAUTH_CLIENT_SECRET}}
|
||||
- -s -w -X github.com/cli/cli/command.Version={{.Version}} -X github.com/cli/cli/command.BuildDate={{time "2006-01-02"}}
|
||||
- -X github.com/cli/cli/context.oauthClientID={{.Env.GH_OAUTH_CLIENT_ID}}
|
||||
- -X github.com/cli/cli/context.oauthClientSecret={{.Env.GH_OAUTH_CLIENT_SECRET}}
|
||||
- -X main.updaterEnabled=github/homebrew-gh
|
||||
goos:
|
||||
- linux
|
||||
|
|
@ -33,7 +33,7 @@ archives:
|
|||
nfpms:
|
||||
- license: MIT
|
||||
maintainer: GitHub
|
||||
homepage: https://github.com/github/gh-cli
|
||||
homepage: https://github.com/cli/cli
|
||||
bindir: /usr/local
|
||||
dependencies:
|
||||
- git
|
||||
|
|
|
|||
8
Makefile
8
Makefile
|
|
@ -2,11 +2,11 @@ BUILD_FILES = $(shell go list -f '{{range .GoFiles}}{{$$.Dir}}/{{.}}\
|
|||
{{end}}' ./...)
|
||||
|
||||
GH_VERSION ?= $(shell git describe --tags 2>/dev/null || git rev-parse --short HEAD)
|
||||
LDFLAGS := -X github.com/github/gh-cli/command.Version=$(GH_VERSION) $(LDFLAGS)
|
||||
LDFLAGS := -X github.com/github/gh-cli/command.BuildDate=$(shell date +%Y-%m-%d) $(LDFLAGS)
|
||||
LDFLAGS := -X github.com/cli/cli/command.Version=$(GH_VERSION) $(LDFLAGS)
|
||||
LDFLAGS := -X github.com/cli/cli/command.BuildDate=$(shell date +%Y-%m-%d) $(LDFLAGS)
|
||||
ifdef GH_OAUTH_CLIENT_SECRET
|
||||
LDFLAGS := -X github.com/github/gh-cli/context.oauthClientID=$(GH_OAUTH_CLIENT_ID) $(LDFLAGS)
|
||||
LDFLAGS := -X github.com/github/gh-cli/context.oauthClientSecret=$(GH_OAUTH_CLIENT_SECRET) $(LDFLAGS)
|
||||
LDFLAGS := -X github.com/cli/cli/context.oauthClientID=$(GH_OAUTH_CLIENT_ID) $(LDFLAGS)
|
||||
LDFLAGS := -X github.com/cli/cli/context.oauthClientSecret=$(GH_OAUTH_CLIENT_SECRET) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
bin/gh: $(BUILD_FILES)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/github/gh-cli/internal/ghrepo"
|
||||
"github.com/cli/cli/internal/ghrepo"
|
||||
)
|
||||
|
||||
type IssuesPayload struct {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/github/gh-cli/internal/ghrepo"
|
||||
"github.com/cli/cli/internal/ghrepo"
|
||||
)
|
||||
|
||||
type PullRequestsPayload struct {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/github/gh-cli/internal/ghrepo"
|
||||
"github.com/cli/cli/internal/ghrepo"
|
||||
)
|
||||
|
||||
// Repository contains information about a GitHub repo
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/github/gh-cli/command"
|
||||
"github.com/cli/cli/command"
|
||||
"github.com/spf13/cobra/doc"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ import (
|
|||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/github/gh-cli/command"
|
||||
"github.com/github/gh-cli/context"
|
||||
"github.com/github/gh-cli/update"
|
||||
"github.com/github/gh-cli/utils"
|
||||
"github.com/cli/cli/command"
|
||||
"github.com/cli/cli/context"
|
||||
"github.com/cli/cli/update"
|
||||
"github.com/cli/cli/utils"
|
||||
"github.com/mattn/go-isatty"
|
||||
"github.com/mgutz/ansi"
|
||||
"github.com/spf13/cobra"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"net"
|
||||
"testing"
|
||||
|
||||
"github.com/github/gh-cli/command"
|
||||
"github.com/cli/cli/command"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/github/gh-cli/api"
|
||||
"github.com/github/gh-cli/git"
|
||||
"github.com/github/gh-cli/internal/ghrepo"
|
||||
"github.com/github/gh-cli/pkg/githubtemplate"
|
||||
"github.com/github/gh-cli/utils"
|
||||
"github.com/cli/cli/api"
|
||||
"github.com/cli/cli/git"
|
||||
"github.com/cli/cli/internal/ghrepo"
|
||||
"github.com/cli/cli/pkg/githubtemplate"
|
||||
"github.com/cli/cli/utils"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/github/gh-cli/utils"
|
||||
"github.com/cli/cli/utils"
|
||||
)
|
||||
|
||||
func TestIssueStatus(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/github/gh-cli/api"
|
||||
"github.com/github/gh-cli/context"
|
||||
"github.com/github/gh-cli/git"
|
||||
"github.com/github/gh-cli/internal/ghrepo"
|
||||
"github.com/github/gh-cli/utils"
|
||||
"github.com/cli/cli/api"
|
||||
"github.com/cli/cli/context"
|
||||
"github.com/cli/cli/git"
|
||||
"github.com/cli/cli/internal/ghrepo"
|
||||
"github.com/cli/cli/utils"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/github/gh-cli/context"
|
||||
"github.com/github/gh-cli/utils"
|
||||
"github.com/cli/cli/context"
|
||||
"github.com/cli/cli/utils"
|
||||
)
|
||||
|
||||
func TestPRCheckout_sameRepo(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ import (
|
|||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/github/gh-cli/api"
|
||||
"github.com/github/gh-cli/context"
|
||||
"github.com/github/gh-cli/git"
|
||||
"github.com/github/gh-cli/internal/ghrepo"
|
||||
"github.com/github/gh-cli/pkg/githubtemplate"
|
||||
"github.com/github/gh-cli/utils"
|
||||
"github.com/cli/cli/api"
|
||||
"github.com/cli/cli/context"
|
||||
"github.com/cli/cli/git"
|
||||
"github.com/cli/cli/internal/ghrepo"
|
||||
"github.com/cli/cli/pkg/githubtemplate"
|
||||
"github.com/cli/cli/utils"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/github/gh-cli/api"
|
||||
"github.com/github/gh-cli/context"
|
||||
"github.com/github/gh-cli/git"
|
||||
"github.com/github/gh-cli/internal/ghrepo"
|
||||
"github.com/github/gh-cli/test"
|
||||
"github.com/github/gh-cli/utils"
|
||||
"github.com/cli/cli/api"
|
||||
"github.com/cli/cli/context"
|
||||
"github.com/cli/cli/git"
|
||||
"github.com/cli/cli/internal/ghrepo"
|
||||
"github.com/cli/cli/test"
|
||||
"github.com/cli/cli/utils"
|
||||
)
|
||||
|
||||
func TestPrCreateHelperProcess(*testing.T) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/github/gh-cli/utils"
|
||||
"github.com/cli/cli/utils"
|
||||
"github.com/google/shlex"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/github/gh-cli/api"
|
||||
"github.com/github/gh-cli/context"
|
||||
"github.com/github/gh-cli/utils"
|
||||
"github.com/cli/cli/api"
|
||||
"github.com/cli/cli/context"
|
||||
"github.com/cli/cli/utils"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package command
|
|||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/github/gh-cli/api"
|
||||
"github.com/github/gh-cli/context"
|
||||
"github.com/cli/cli/api"
|
||||
"github.com/cli/cli/context"
|
||||
)
|
||||
|
||||
func initBlankContext(repo, branch string) {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/AlecAivazis/survey/v2"
|
||||
"github.com/github/gh-cli/pkg/githubtemplate"
|
||||
"github.com/github/gh-cli/pkg/surveyext"
|
||||
"github.com/cli/cli/pkg/githubtemplate"
|
||||
"github.com/cli/cli/pkg/surveyext"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/github/gh-cli/git"
|
||||
"github.com/github/gh-cli/internal/ghrepo"
|
||||
"github.com/cli/cli/git"
|
||||
"github.com/cli/cli/internal/ghrepo"
|
||||
)
|
||||
|
||||
// NewBlank initializes a blank Context suitable for testing
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/github/gh-cli/api"
|
||||
"github.com/github/gh-cli/auth"
|
||||
"github.com/cli/cli/api"
|
||||
"github.com/cli/cli/auth"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package context
|
|||
import (
|
||||
"path"
|
||||
|
||||
"github.com/github/gh-cli/git"
|
||||
"github.com/github/gh-cli/internal/ghrepo"
|
||||
"github.com/cli/cli/git"
|
||||
"github.com/cli/cli/internal/ghrepo"
|
||||
"github.com/mitchellh/go-homedir"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/github/gh-cli/git"
|
||||
"github.com/github/gh-cli/internal/ghrepo"
|
||||
"github.com/cli/cli/git"
|
||||
"github.com/cli/cli/internal/ghrepo"
|
||||
)
|
||||
|
||||
// Remotes represents a set of git remotes
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/github/gh-cli/git"
|
||||
"github.com/cli/cli/git"
|
||||
)
|
||||
|
||||
func Test_Remotes_FindByName(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/github/gh-cli/utils"
|
||||
"github.com/cli/cli/utils"
|
||||
)
|
||||
|
||||
func VerifyRef(ref string) bool {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/github/gh-cli/test"
|
||||
"github.com/cli/cli/test"
|
||||
)
|
||||
|
||||
func TestGitStatusHelperProcess(*testing.T) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/github/gh-cli/utils"
|
||||
"github.com/cli/cli/utils"
|
||||
)
|
||||
|
||||
var remoteRE = regexp.MustCompile(`(.+)\s+(.+)\s+\((push|fetch)\)`)
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,4 +1,4 @@
|
|||
module github.com/github/gh-cli
|
||||
module github.com/cli/cli
|
||||
|
||||
go 1.13
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package surveyext
|
||||
|
||||
// This file extends survey.Editor to give it more flexible behavior. For more context, read
|
||||
// https://github.com/github/gh-cli/issues/70
|
||||
// https://github.com/cli/cli/issues/70
|
||||
// To see what we extended, search through for EXTENDED comments.
|
||||
|
||||
import (
|
||||
|
|
|
|||
8
test/fixtures/prStatus.json
vendored
8
test/fixtures/prStatus.json
vendored
|
|
@ -8,7 +8,7 @@
|
|||
"node": {
|
||||
"number": 10,
|
||||
"title": "Blueberries are a good fruit",
|
||||
"url": "https://github.com/github/gh-cli/pull/10",
|
||||
"url": "https://github.com/cli/cli/pull/10",
|
||||
"headRefName": "blueberries",
|
||||
"headRepositoryOwner": {
|
||||
"login": "OWNER"
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
"node": {
|
||||
"number": 8,
|
||||
"title": "Strawberries are not actually berries",
|
||||
"url": "https://github.com/github/gh-cli/pull/8",
|
||||
"url": "https://github.com/cli/cli/pull/8",
|
||||
"headRefName": "strawberries"
|
||||
}
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
"node": {
|
||||
"number": 9,
|
||||
"title": "Apples are tasty",
|
||||
"url": "https://github.com/github/gh-cli/pull/9",
|
||||
"url": "https://github.com/cli/cli/pull/9",
|
||||
"headRefName": "apples"
|
||||
}
|
||||
},
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
"node": {
|
||||
"number": 11,
|
||||
"title": "Figs are my favorite",
|
||||
"url": "https://github.com/github/gh-cli/pull/1",
|
||||
"url": "https://github.com/cli/cli/pull/1",
|
||||
"headRefName": "figs"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
6
test/fixtures/prStatusChecks.json
vendored
6
test/fixtures/prStatusChecks.json
vendored
|
|
@ -13,7 +13,7 @@
|
|||
"node": {
|
||||
"number": 8,
|
||||
"title": "Strawberries are not actually berries",
|
||||
"url": "https://github.com/github/gh-cli/pull/8",
|
||||
"url": "https://github.com/cli/cli/pull/8",
|
||||
"headRefName": "strawberries",
|
||||
"reviewDecision": "CHANGES_REQUESTED",
|
||||
"commits": {
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
"node": {
|
||||
"number": 7,
|
||||
"title": "Bananas are berries",
|
||||
"url": "https://github.com/github/gh-cli/pull/7",
|
||||
"url": "https://github.com/cli/cli/pull/7",
|
||||
"headRefName": "banananana",
|
||||
"reviewDecision": "APPROVED",
|
||||
"commits": {
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
"node": {
|
||||
"number": 6,
|
||||
"title": "Avocado is probably not a berry",
|
||||
"url": "https://github.com/github/gh-cli/pull/6",
|
||||
"url": "https://github.com/cli/cli/pull/6",
|
||||
"headRefName": "avo",
|
||||
"reviewDecision": "REVIEW_REQUIRED",
|
||||
"commits": {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"io/ioutil"
|
||||
"time"
|
||||
|
||||
"github.com/github/gh-cli/api"
|
||||
"github.com/cli/cli/api"
|
||||
"github.com/hashicorp/go-version"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/github/gh-cli/api"
|
||||
"github.com/cli/cli/api"
|
||||
)
|
||||
|
||||
func TestCheckForUpdate(t *testing.T) {
|
||||
|
|
|
|||
4
wix.json
4
wix.json
|
|
@ -25,8 +25,8 @@
|
|||
"shortcuts": {},
|
||||
"choco": {
|
||||
"description": "Use GitHub from the CLI",
|
||||
"project-url": "https://github.com/github/gh-cli",
|
||||
"project-url": "https://github.com/cli/cli",
|
||||
"tags": "github cli git",
|
||||
"license-url": "https://github.com/github/gh-cli/blob/master/LICENSE"
|
||||
"license-url": "https://github.com/cli/cli/blob/master/LICENSE"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue