Skip to content

Commit

Permalink
feat: Upgrades to v2 packages to track with v2 git tag (#198)
Browse files Browse the repository at this point in the history
Signed-off-by: John McBride <john@opensauced.pizza>
  • Loading branch information
jpmcb authored Sep 18, 2024
1 parent 503b3bd commit 5a0995d
Show file tree
Hide file tree
Showing 32 changed files with 71 additions and 73 deletions.
2 changes: 1 addition & 1 deletion api/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/cli/browser"
"github.com/go-chi/chi/v5"

"github.com/open-sauced/pizza-cli/pkg/config"
"github.com/open-sauced/pizza-cli/v2/pkg/config"
)

// The success HTML file is embedded directly as a var.
Expand Down
8 changes: 4 additions & 4 deletions api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"net/http"
"time"

"github.com/open-sauced/pizza-cli/api/services/contributors"
"github.com/open-sauced/pizza-cli/api/services/histogram"
"github.com/open-sauced/pizza-cli/api/services/repository"
"github.com/open-sauced/pizza-cli/api/services/workspaces"
"github.com/open-sauced/pizza-cli/v2/api/services/contributors"
"github.com/open-sauced/pizza-cli/v2/api/services/histogram"
"github.com/open-sauced/pizza-cli/v2/api/services/repository"
"github.com/open-sauced/pizza-cli/v2/api/services/workspaces"
)

// Client is the API client for OpenSauced API
Expand Down
4 changes: 2 additions & 2 deletions api/services/contributors/contributors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/open-sauced/pizza-cli/api/mock"
"github.com/open-sauced/pizza-cli/api/services"
"github.com/open-sauced/pizza-cli/v2/api/mock"
"github.com/open-sauced/pizza-cli/v2/api/services"
)

func TestNewPullrequestContributors(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion api/services/contributors/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package contributors
import (
"time"

"github.com/open-sauced/pizza-cli/api/services"
"github.com/open-sauced/pizza-cli/v2/api/services"
)

type DbContributor struct {
Expand Down
2 changes: 1 addition & 1 deletion api/services/histogram/histogram_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/open-sauced/pizza-cli/api/mock"
"github.com/open-sauced/pizza-cli/v2/api/mock"
)

func TestPrsHistogram(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions api/services/repository/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/open-sauced/pizza-cli/api/mock"
"github.com/open-sauced/pizza-cli/api/services"
"github.com/open-sauced/pizza-cli/v2/api/mock"
"github.com/open-sauced/pizza-cli/v2/api/services"
)

func TestFindOneByOwnerAndRepo(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion api/services/workspaces/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package workspaces
import (
"time"

"github.com/open-sauced/pizza-cli/api/services"
"github.com/open-sauced/pizza-cli/v2/api/services"
)

type DbWorkspace struct {
Expand Down
2 changes: 1 addition & 1 deletion api/services/workspaces/userlists/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package userlists
import (
"time"

"github.com/open-sauced/pizza-cli/api/services"
"github.com/open-sauced/pizza-cli/v2/api/services"
)

type DbUserListContributor struct {
Expand Down
4 changes: 2 additions & 2 deletions api/services/workspaces/userlists/userlists_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/open-sauced/pizza-cli/api/mock"
"github.com/open-sauced/pizza-cli/api/services"
"github.com/open-sauced/pizza-cli/v2/api/mock"
"github.com/open-sauced/pizza-cli/v2/api/services"
)

func TestGetUserLists(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion api/services/workspaces/workspaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/url"
"strconv"

"github.com/open-sauced/pizza-cli/api/services/workspaces/userlists"
"github.com/open-sauced/pizza-cli/v2/api/services/workspaces/userlists"
)

// Service is used to access the "v2/workspaces" endpoints and services.
Expand Down
4 changes: 2 additions & 2 deletions api/services/workspaces/workspaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/open-sauced/pizza-cli/api/mock"
"github.com/open-sauced/pizza-cli/api/services"
"github.com/open-sauced/pizza-cli/v2/api/mock"
"github.com/open-sauced/pizza-cli/v2/api/services"
)

func TestGetWorkspaces(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions cmd/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (

"github.com/spf13/cobra"

"github.com/open-sauced/pizza-cli/api/auth"
"github.com/open-sauced/pizza-cli/pkg/constants"
"github.com/open-sauced/pizza-cli/pkg/utils"
"github.com/open-sauced/pizza-cli/v2/api/auth"
"github.com/open-sauced/pizza-cli/v2/pkg/constants"
"github.com/open-sauced/pizza-cli/v2/pkg/utils"
)

// Options are the persistent options for the login command
Expand Down
8 changes: 4 additions & 4 deletions cmd/generate/codeowners/codeowners.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"github.com/jpmcb/gopherlogs/pkg/colors"
"github.com/spf13/cobra"

"github.com/open-sauced/pizza-cli/pkg/config"
"github.com/open-sauced/pizza-cli/pkg/constants"
"github.com/open-sauced/pizza-cli/pkg/logging"
"github.com/open-sauced/pizza-cli/pkg/utils"
"github.com/open-sauced/pizza-cli/v2/pkg/config"
"github.com/open-sauced/pizza-cli/v2/pkg/constants"
"github.com/open-sauced/pizza-cli/v2/pkg/logging"
"github.com/open-sauced/pizza-cli/v2/pkg/utils"
)

// Options for the codeowners generation command
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate/codeowners/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"

"github.com/open-sauced/pizza-cli/pkg/config"
"github.com/open-sauced/pizza-cli/v2/pkg/config"
)

func generateOutputFile(fileStats FileStats, outputPath string, opts *Options, cmd *cobra.Command) error {
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate/codeowners/output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/open-sauced/pizza-cli/pkg/config"
"github.com/open-sauced/pizza-cli/v2/pkg/config"
)

func TestCleanFilename(testRunner *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate/codeowners/traversal.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/jpmcb/gopherlogs"
"github.com/jpmcb/gopherlogs/pkg/colors"

"github.com/open-sauced/pizza-cli/pkg/logging"
"github.com/open-sauced/pizza-cli/v2/pkg/logging"
)

// ProcessOptions are the options for iterating a git reflog and deriving the codeowners
Expand Down
4 changes: 2 additions & 2 deletions cmd/generate/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/spf13/cobra"

"github.com/open-sauced/pizza-cli/pkg/constants"
"github.com/open-sauced/pizza-cli/pkg/utils"
"github.com/open-sauced/pizza-cli/v2/pkg/constants"
"github.com/open-sauced/pizza-cli/v2/pkg/utils"
)

// Options for the config generation command
Expand Down
4 changes: 2 additions & 2 deletions cmd/generate/config/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/open-sauced/pizza-cli/pkg/config"
"github.com/open-sauced/pizza-cli/pkg/utils"
"github.com/open-sauced/pizza-cli/v2/pkg/config"
"github.com/open-sauced/pizza-cli/v2/pkg/utils"
)

func generateOutputFile(outputPath string, attributionMap map[string][]string) error {
Expand Down
6 changes: 3 additions & 3 deletions cmd/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (

"github.com/spf13/cobra"

"github.com/open-sauced/pizza-cli/cmd/generate/codeowners"
"github.com/open-sauced/pizza-cli/cmd/generate/config"
"github.com/open-sauced/pizza-cli/cmd/generate/insight"
"github.com/open-sauced/pizza-cli/v2/cmd/generate/codeowners"
"github.com/open-sauced/pizza-cli/v2/cmd/generate/config"
"github.com/open-sauced/pizza-cli/v2/cmd/generate/insight"
)

const generateLongDesc string = `The 'generate' command provides tools to automate the creation of important project documentation and derive insights from your codebase.`
Expand Down
14 changes: 7 additions & 7 deletions cmd/generate/insight/insight.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (
"github.com/jpmcb/gopherlogs/pkg/colors"
"github.com/spf13/cobra"

"github.com/open-sauced/pizza-cli/api"
"github.com/open-sauced/pizza-cli/api/auth"
"github.com/open-sauced/pizza-cli/api/services/workspaces"
"github.com/open-sauced/pizza-cli/api/services/workspaces/userlists"
"github.com/open-sauced/pizza-cli/pkg/constants"
"github.com/open-sauced/pizza-cli/pkg/logging"
"github.com/open-sauced/pizza-cli/pkg/utils"
"github.com/open-sauced/pizza-cli/v2/api"
"github.com/open-sauced/pizza-cli/v2/api/auth"
"github.com/open-sauced/pizza-cli/v2/api/services/workspaces"
"github.com/open-sauced/pizza-cli/v2/api/services/workspaces/userlists"
"github.com/open-sauced/pizza-cli/v2/pkg/constants"
"github.com/open-sauced/pizza-cli/v2/pkg/logging"
"github.com/open-sauced/pizza-cli/v2/pkg/utils"
)

// Options for the codeowners generation command
Expand Down
10 changes: 5 additions & 5 deletions cmd/insights/contributors.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
bubblesTable "github.com/charmbracelet/bubbles/table"
"github.com/spf13/cobra"

"github.com/open-sauced/pizza-cli/api"
"github.com/open-sauced/pizza-cli/api/services/contributors"
apiUtils "github.com/open-sauced/pizza-cli/api/utils"
"github.com/open-sauced/pizza-cli/pkg/constants"
"github.com/open-sauced/pizza-cli/pkg/utils"
"github.com/open-sauced/pizza-cli/v2/api"
"github.com/open-sauced/pizza-cli/v2/api/services/contributors"
apiUtils "github.com/open-sauced/pizza-cli/v2/api/utils"
"github.com/open-sauced/pizza-cli/v2/pkg/constants"
"github.com/open-sauced/pizza-cli/v2/pkg/utils"
)

type contributorsOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/insights/insights.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package insights
import (
"github.com/spf13/cobra"

"github.com/open-sauced/pizza-cli/pkg/constants"
"github.com/open-sauced/pizza-cli/v2/pkg/constants"
)

// NewInsightsCommand returns a new cobra command for 'pizza insights'
Expand Down
10 changes: 5 additions & 5 deletions cmd/insights/repositories.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
bubblesTable "github.com/charmbracelet/bubbles/table"
"github.com/spf13/cobra"

"github.com/open-sauced/pizza-cli/api"
"github.com/open-sauced/pizza-cli/api/services/contributors"
"github.com/open-sauced/pizza-cli/api/services/histogram"
"github.com/open-sauced/pizza-cli/pkg/constants"
"github.com/open-sauced/pizza-cli/pkg/utils"
"github.com/open-sauced/pizza-cli/v2/api"
"github.com/open-sauced/pizza-cli/v2/api/services/contributors"
"github.com/open-sauced/pizza-cli/v2/api/services/histogram"
"github.com/open-sauced/pizza-cli/v2/pkg/constants"
"github.com/open-sauced/pizza-cli/v2/pkg/utils"
)

type repositoriesOptions struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/insights/user-contributions.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
bubblesTable "github.com/charmbracelet/bubbles/table"
"github.com/spf13/cobra"

"github.com/open-sauced/pizza-cli/api"
"github.com/open-sauced/pizza-cli/pkg/constants"
"github.com/open-sauced/pizza-cli/pkg/utils"
"github.com/open-sauced/pizza-cli/v2/api"
"github.com/open-sauced/pizza-cli/v2/pkg/constants"
"github.com/open-sauced/pizza-cli/v2/pkg/utils"
)

type userContributionsOptions struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/insights/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"net/http"

"github.com/open-sauced/pizza-cli/api"
"github.com/open-sauced/pizza-cli/api/services/repository"
"github.com/open-sauced/pizza-cli/pkg/utils"
"github.com/open-sauced/pizza-cli/v2/api"
"github.com/open-sauced/pizza-cli/v2/api/services/repository"
"github.com/open-sauced/pizza-cli/v2/pkg/utils"
)

// findRepositoryByOwnerAndRepoName returns an API client Db Repo
Expand Down
12 changes: 6 additions & 6 deletions cmd/root/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (

"github.com/spf13/cobra"

"github.com/open-sauced/pizza-cli/cmd/auth"
"github.com/open-sauced/pizza-cli/cmd/docs"
"github.com/open-sauced/pizza-cli/cmd/generate"
"github.com/open-sauced/pizza-cli/cmd/insights"
"github.com/open-sauced/pizza-cli/cmd/version"
"github.com/open-sauced/pizza-cli/pkg/constants"
"github.com/open-sauced/pizza-cli/v2/cmd/auth"
"github.com/open-sauced/pizza-cli/v2/cmd/docs"
"github.com/open-sauced/pizza-cli/v2/cmd/generate"
"github.com/open-sauced/pizza-cli/v2/cmd/insights"
"github.com/open-sauced/pizza-cli/v2/cmd/version"
"github.com/open-sauced/pizza-cli/v2/pkg/constants"
)

// NewRootCommand bootstraps a new root cobra command for the pizza CLI
Expand Down
2 changes: 1 addition & 1 deletion cmd/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/spf13/cobra"

"github.com/open-sauced/pizza-cli/pkg/utils"
"github.com/open-sauced/pizza-cli/v2/pkg/utils"
)

func NewVersionCommand() *cobra.Command {
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/open-sauced/pizza-cli
module github.com/open-sauced/pizza-cli/v2

go 1.22

Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posthog/posthog-go v1.2.19 h1:0udGG2do4LjOzE0D/ik7S3uM2wwFKwzSqswBfdcQ1y4=
github.com/posthog/posthog-go v1.2.19/go.mod h1:uYC2l1Yktc8E+9FAHJ9QZG4vQf/NHJPD800Hsm7DzoM=
github.com/posthog/posthog-go v1.2.21 h1:p2ea0l+Qwtk+VC2LCAI87Dz36vwj9i+QHw5s6CpRikA=
github.com/posthog/posthog-go v1.2.21/go.mod h1:uYC2l1Yktc8E+9FAHJ9QZG4vQf/NHJPD800Hsm7DzoM=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"log"
"os"

"github.com/open-sauced/pizza-cli/cmd/root"
"github.com/open-sauced/pizza-cli/pkg/utils"
"github.com/open-sauced/pizza-cli/v2/cmd/root"
"github.com/open-sauced/pizza-cli/v2/pkg/utils"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/spf13/pflag"
"golang.org/x/term"

"github.com/open-sauced/pizza-cli/pkg/constants"
"github.com/open-sauced/pizza-cli/v2/pkg/constants"
)

// SetupRootCommand is a convenience utility for applying templates and nice
Expand Down
2 changes: 1 addition & 1 deletion telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package main

import "github.com/open-sauced/pizza-cli/pkg/utils"
import "github.com/open-sauced/pizza-cli/v2/pkg/utils"

// This alternate main is used as a one-shot for bootstrapping Posthog events:
// the various events called herein do not exist in Posthog's datalake until the
Expand Down

0 comments on commit 5a0995d

Please sign in to comment.