Skip to content

Commit

Permalink
Merge branch 'main' into PLT-1524
Browse files Browse the repository at this point in the history
  • Loading branch information
SivaanandM authored Dec 19, 2024
2 parents f2323c9 + 4b94c84 commit 44fd1b3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/golangci/golangci-lint
rev: v1.59.1
rev: v1.62.2
hooks:
- id: golangci-lint
entry: golangci-lint run --new-from-rev HEAD --whole-files --fix
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ ERR = echo ${TIME} ${RED}[ ERR ]${CNone} "error:"
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[0m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

##@ Build Targets

generate: ## Generate models
(cd api && ./generate.sh ./)

##@ Static Analysis Targets

check-diff: reviewable ## Execute branch is clean
Expand Down Expand Up @@ -58,7 +63,7 @@ BIN_DIR ?= ./bin
bin-dir:
test -d $(BIN_DIR) || mkdir $(BIN_DIR)

GOLANGCI_VERSION ?= 1.59.1
GOLANGCI_VERSION ?= 1.62.2
.PHONY: golangci-lint
golangci-lint: bin-dir
if ! test -f $(BIN_DIR)/golangci-lint-linux-amd64; then \
Expand Down
10 changes: 10 additions & 0 deletions client/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ func (h *V1Client) GetPackRegistryByName(registryName string) (*models.V1PackReg
return nil, fmt.Errorf("registry '%s' not found", registryName)
}

// ListPackRegistries retries a list of all Pack registries.
func (h *V1Client) ListPackRegistries() ([]*models.V1PackRegistrySummary, error) {
params := clientv1.NewV1RegistriesPackSummaryListParamsWithContext(h.ctx)
resp, err := h.Client.V1RegistriesPackSummaryList(params)
if err != nil {
return nil, err
}
return resp.Payload.Items, nil
}

// ListHelmRegistries retrieves a list of all Helm registries, filtered by scope.
func (h *V1Client) ListHelmRegistries(scope string) ([]*models.V1HelmRegistrySummary, error) {
params := clientv1.NewV1RegistriesHelmSummaryListParamsWithContext(h.ctx).
Expand Down

0 comments on commit 44fd1b3

Please sign in to comment.