Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect plan operations to dashboard #907

Merged
merged 4 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/brew-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Homebrew
id: set-up-homebrew
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
needs: authorize
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
#ref: "refs/pull/${{ github.event.number }}/merge" # THIS IS INSECURE

- name: Setup Golang with cache
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
Expand All @@ -55,7 +55,7 @@ jobs:
run: go vet -vettool=${HOME}/go/bin/sqlclosecheck ./...

- name: Staticcheck
uses: dominikh/staticcheck-action@v1.3.0
uses: dominikh/staticcheck-action@v1
with:
version: "2023.1.2"
build-tags: "preview"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Run GoReleaser
Expand Down
28 changes: 18 additions & 10 deletions internal/cmd/org.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,19 +483,27 @@ var membersRemoveCmd = &cobra.Command{
}

var orgBillingCmd = &cobra.Command{
Use: "billing",
Short: "Manange payment methods for the current organization.",
Args: cobra.ExactArgs(0),
Use: "billing",
Short: "Manange payment methods for the current organization.",
Hidden: true,
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
cmd.SilenceUsage = true
return BillingPortal()
},
}

client, err := authedTursoClient()
if err != nil {
return err
}
func BillingPortal() error {
settings, err := settings.ReadSettings()
if err != nil {
return err
}

return billingPortal(client)
},
org := settings.Organization()
if org == "" {
org = settings.GetUsername()
}

return billingPortal(org)
}

func listOrganizations(client *turso.Client, fresh ...bool) ([]turso.Organization, error) {
Expand Down
Loading
Loading