Skip to content

Commit 567e7be

Browse files
authored
redirect plan operations to dashboard (#907)
* redirect plan operations to dashboard * remove unused functions * fix: update action versions * fix: hide commands
1 parent c34334d commit 567e7be

5 files changed

Lines changed: 45 additions & 310 deletions

File tree

.github/workflows/brew-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Checkout repository
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1616

1717
- name: Set up Homebrew
1818
id: set-up-homebrew

.github/workflows/go.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ jobs:
2525
needs: authorize
2626
runs-on: ubuntu-latest
2727
steps:
28-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
2929
with:
3030
ref: ${{ github.event.pull_request.head.sha || github.ref }}
3131
#ref: "refs/pull/${{ github.event.number }}/merge" # THIS IS INSECURE
3232

3333
- name: Setup Golang with cache
34-
uses: actions/setup-go@v4
34+
uses: actions/setup-go@v5
3535
with:
3636
go-version-file: go.mod
3737
cache: false
@@ -55,7 +55,7 @@ jobs:
5555
run: go vet -vettool=${HOME}/go/bin/sqlclosecheck ./...
5656

5757
- name: Staticcheck
58-
uses: dominikh/staticcheck-action@v1.3.0
58+
uses: dominikh/staticcheck-action@v1
5959
with:
6060
version: "2023.1.2"
6161
build-tags: "preview"

.github/workflows/goreleaser.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
1919
- name: Set up Go
20-
uses: actions/setup-go@v3
20+
uses: actions/setup-go@v5
2121
with:
2222
go-version: "1.21"
2323
- name: Run GoReleaser

internal/cmd/org.go

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -483,19 +483,27 @@ var membersRemoveCmd = &cobra.Command{
483483
}
484484

485485
var orgBillingCmd = &cobra.Command{
486-
Use: "billing",
487-
Short: "Manange payment methods for the current organization.",
488-
Args: cobra.ExactArgs(0),
486+
Use: "billing",
487+
Short: "Manange payment methods for the current organization.",
488+
Hidden: true,
489+
Args: cobra.ExactArgs(0),
489490
RunE: func(cmd *cobra.Command, args []string) error {
490-
cmd.SilenceUsage = true
491+
return BillingPortal()
492+
},
493+
}
491494

492-
client, err := authedTursoClient()
493-
if err != nil {
494-
return err
495-
}
495+
func BillingPortal() error {
496+
settings, err := settings.ReadSettings()
497+
if err != nil {
498+
return err
499+
}
496500

497-
return billingPortal(client)
498-
},
501+
org := settings.Organization()
502+
if org == "" {
503+
org = settings.GetUsername()
504+
}
505+
506+
return billingPortal(org)
499507
}
500508

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

0 commit comments

Comments
 (0)