Skip to content

Commit

Permalink
Merge pull request #200 from open-sauced/beta
Browse files Browse the repository at this point in the history
chore: release v2.2.0
  • Loading branch information
jpmcb authored Sep 18, 2024
2 parents a659d86 + 19ed450 commit 4ceac8c
Show file tree
Hide file tree
Showing 36 changed files with 97 additions and 76 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@

> All notable changes to this project will be documented in this file
## [2.2.0-beta.2](https://github.com/open-sauced/pizza-cli/compare/v2.2.0-beta.1...v2.2.0-beta.2) (2024-09-18)


### 🍕 Features

* shortcut to skip rest of emails for `pizza generate config` ([#197](https://github.com/open-sauced/pizza-cli/issues/197)) ([6e96fff](https://github.com/open-sauced/pizza-cli/commit/6e96fffb3d8bec5384118f3dedc499d164384ca5))

## [2.2.0-beta.1](https://github.com/open-sauced/pizza-cli/compare/v2.1.0...v2.2.0-beta.1) (2024-09-18)


### 🍕 Features

* Upgrades to v2 packages to track with v2 git tag ([#198](https://github.com/open-sauced/pizza-cli/issues/198)) ([5a0995d](https://github.com/open-sauced/pizza-cli/commit/5a0995d8fb1405ab1d405aef0fd0f20327e2fd53))

## [2.1.0](https://github.com/open-sauced/pizza-cli/compare/v2.0.0...v2.1.0) (2024-09-16)


Expand Down
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
9 changes: 7 additions & 2 deletions cmd/generate/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ import (
"os"
"path/filepath"
"slices"
"strings"

tea "github.com/charmbracelet/bubbletea"
"github.com/go-git/go-git/v5"
"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 Expand Up @@ -109,6 +110,10 @@ func run(opts *Options) error {
name := c.Author.Name
email := c.Author.Email

if strings.Contains(name, "[bot]") {
return nil
}

if opts.ttyDisabled || !opts.isInteractive {
doesEmailExist := slices.Contains(attributionMap[name], email)
if !doesEmailExist {
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
4 changes: 4 additions & 0 deletions cmd/generate/config/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func (k keymap) ShortHelp() []key.Binding {
key.NewBinding(key.WithKeys("ctrl+n"), key.WithHelp("ctrl+n", "next suggestion")),
key.NewBinding(key.WithKeys("ctrl+p"), key.WithHelp("ctrl+p", "prev suggestion")),
key.NewBinding(key.WithKeys("ctrl+i"), key.WithHelp("ctrl+i", "ignore email")),
key.NewBinding(key.WithKeys("ctrl+s"), key.WithHelp("ctrl+s", "skip the rest")),
key.NewBinding(key.WithKeys("esc"), key.WithHelp("esc", "quit")),
key.NewBinding(key.WithKeys("enter"), key.WithHelp("enter", "submit")),
}
Expand Down Expand Up @@ -88,6 +89,9 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
return m, nil

case tea.KeyCtrlS:
return m, runOutputGeneration(m.opts, m.attributionMap)

case tea.KeyEnter:
if len(strings.Trim(m.textInput.Value(), " ")) == 0 {
return m, nil
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
Loading

0 comments on commit 4ceac8c

Please sign in to comment.