Skip to content

Commit

Permalink
Fixing cli docs for deletingUserFromOrg, performance tweak to org upl…
Browse files Browse the repository at this point in the history
…oad. (#270)
  • Loading branch information
safaci2000 authored Mar 27, 2024
1 parent 2d0e19e commit bea04d5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
10 changes: 8 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ vars:
BUILD_DATE: { sh: date '+%Y-%m-%d-%H:%M:%S' }
IMAGE_NAME: "esnet/gdg"
LD_FLAGS: "-s -w -X github.com/esnet/gdg/internal/version.GitCommit={{ .GIT_COMMIT}}{{ .GIT_DIRTY}} -X github.com/esnet/gdg/internal/version.BuildDate={{ .BUILD_DATE }} "
LEFTHOOK_VERSION: "v1.6.7"
MOCKERY_VERSION: "v2.42.0"
RELEASER_VERSION: "v1.24.0"

dotenv: [ '.env' ]

Expand All @@ -22,8 +25,11 @@ tasks:
- go install github.com/client9/misspell/cmd/misspell@latest
- go install github.com/securego/gosec/v2/cmd/gosec@master
- go install golang.org/x/vuln/cmd/govulncheck@latest
- go install github.com/vektra/mockery/[email protected]
- go install github.com/goreleaser/[email protected]
- go install github.com/vektra/mockery/v2@{{ .MOCKERY_VERSION}}
- go install github.com/goreleaser/goreleaser@{{ .RELEASER_VERSION }}
- go install github.com/evilmartians/lefthook@{{ .LEFTHOOK_VERSION }}
- lefthook install

security:
desc: "Run security scan"
cmds:
Expand Down
2 changes: 1 addition & 1 deletion cli/tools/organizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func newAddUserRoleCmd() simplecobra.Commander {
}

func newDeleteUserRoleCmd() simplecobra.Commander {
description := "deleteUser <orgId> <userId> removes a user from the given Organization (This will NOT delete the actual user from Grafana)"
description := "deleteUser <orgSlug> <userId> removes a user from the given Organization (This will NOT delete the actual user from Grafana)"
return &support.SimpleCommand{
NameP: "deleteUser",
Short: description,
Expand Down
2 changes: 1 addition & 1 deletion internal/service/organizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func (s *DashNGoImpl) UploadOrganizations(filter filters.Filter) []string {
if err != nil {
log.Fatalf("Failed to read folders imports, err: %v", err)
}
orgListing := s.ListOrganizations(filter, true)
orgListing := s.ListOrganizations(filter, false)
orgMap := map[string]bool{}
for _, entry := range orgListing {
orgMap[entry.Organization.Name] = true
Expand Down
9 changes: 9 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
min_version: 1.4.3

pre-commit:
parallel: true
commands:
backend-format:
glob: '**/*.go'
run: gofmt -w -s {staged_files}
stage_fixed: true

0 comments on commit bea04d5

Please sign in to comment.