Skip to content

feat(coderd): expose parameter description and type #8944

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

Merged
merged 7 commits into from
Aug 7, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix
  • Loading branch information
mtojek committed Aug 7, 2023
commit 0b9f6a8e25d32397d1ea0d15fc841e348c8353b9
5 changes: 2 additions & 3 deletions coderd/database/db2sdk/db2sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"sort"

"github.com/google/uuid"
"golang.org/x/xerrors"

"github.com/coder/coder/coderd/database"
"github.com/coder/coder/coderd/parameter"
Expand Down Expand Up @@ -132,12 +131,12 @@ func TemplateInsightsParameters(parameterRows []database.GetTemplateParameterIns
var opts []codersdk.TemplateVersionParameterOption
err := json.Unmarshal(param.Options, &opts)
if err != nil {
return nil, xerrors.Errorf("unmarshal template parameter options: %w", err)
return nil, err
}

plaintextDescription, err := parameter.Plaintext(param.Description)
if err != nil {
return nil, xerrors.Errorf("unmarshal template parameter options: %w", err)
return nil, err
}

parametersByNum[param.Num] = &codersdk.TemplateParameterUsage{
Expand Down