Skip to content

Commit

Permalink
Rename to cli/cli
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Jan 24, 2020
1 parent 11bfa65 commit a710893
Show file tree
Hide file tree
Showing 33 changed files with 75 additions and 75 deletions.
8 changes: 4 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion api/queries_issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/github/gh-cli/internal/ghrepo"
"github.com/cli/cli/internal/ghrepo"
)

type IssuesPayload struct {
Expand Down
2 changes: 1 addition & 1 deletion api/queries_pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/github/gh-cli/internal/ghrepo"
"github.com/cli/cli/internal/ghrepo"
)

type PullRequestsPayload struct {
Expand Down
2 changes: 1 addition & 1 deletion api/queries_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/gen-docs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/github/gh-cli/command"
"github.com/cli/cli/command"
"github.com/spf13/cobra/doc"
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/gh/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion cmd/gh/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net"
"testing"

"github.com/github/gh-cli/command"
"github.com/cli/cli/command"
"github.com/spf13/cobra"
)

Expand Down
10 changes: 5 additions & 5 deletions command/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion command/issue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"regexp"
"testing"

"github.com/github/gh-cli/utils"
"github.com/cli/cli/utils"
)

func TestIssueStatus(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions command/pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions command/pr_checkout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
12 changes: 6 additions & 6 deletions command/pr_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
12 changes: 6 additions & 6 deletions command/pr_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion command/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions command/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions command/title_body_survey.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
4 changes: 2 additions & 2 deletions context/blank_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions context/config_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
4 changes: 2 additions & 2 deletions context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
4 changes: 2 additions & 2 deletions context/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion context/remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"regexp"
"strings"

"github.com/github/gh-cli/utils"
"github.com/cli/cli/utils"
)

func VerifyRef(ref string) bool {
Expand Down
2 changes: 1 addition & 1 deletion git/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"regexp"
"testing"

"github.com/github/gh-cli/test"
"github.com/cli/cli/test"
)

func TestGitStatusHelperProcess(*testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion git/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)\)`)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/github/gh-cli
module github.com/cli/cli

go 1.13

Expand Down
2 changes: 1 addition & 1 deletion pkg/surveyext/editor.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
8 changes: 4 additions & 4 deletions test/fixtures/prStatus.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
}
}
Expand All @@ -39,15 +39,15 @@
"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"
}
},
{
"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"
}
}
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures/prStatusChecks.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand Down
Loading

0 comments on commit a710893

Please sign in to comment.