Skip to content

Commit 90412c7

Browse files
committed
pr comments
1 parent da95666 commit 90412c7

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

codersdk/provisionerdaemons.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@ func (c *Client) ServeProvisionerDaemon(ctx context.Context, req ServeProvisione
267267
}
268268

269269
type ProvisionerKey struct {
270-
ID uuid.UUID `json:"id" format:"uuid"`
271-
CreatedAt time.Time `json:"created_at" format:"date-time"`
272-
OrganizationID uuid.UUID `json:"organization" format:"uuid"`
273-
Name string `json:"name"`
270+
ID uuid.UUID `json:"id" table:"-" format:"uuid"`
271+
CreatedAt time.Time `json:"created_at" table:"created_at" format:"date-time"`
272+
OrganizationID uuid.UUID `json:"organization" table:"organization_id" format:"uuid"`
273+
Name string `json:"name" table:"name,default_sort"`
274274
// HashedSecret - never include the access token in the API response
275275
}
276276

enterprise/cli/provisionerkeys.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ func (r *RootCmd) provisionerKeysCreate() *serpent.Command {
6060
return xerrors.Errorf("create provisioner key: %w", err)
6161
}
6262

63-
_, _ = fmt.Fprintf(inv.Stdout, "Successfully created provisioner key %s!\n\n%s\n", pretty.Sprint(cliui.DefaultStyles.Keyword, strings.ToLower(inv.Args[0])), pretty.Sprint(cliui.DefaultStyles.Keyword, res.Key))
63+
_, _ = fmt.Fprintf(
64+
inv.Stdout,
65+
"Successfully created provisioner key %s! Save this authentication token, it will not be shown again.\n\n%s\n",
66+
pretty.Sprint(cliui.DefaultStyles.Keyword, strings.ToLower(inv.Args[0])),
67+
pretty.Sprint(cliui.DefaultStyles.Keyword, res.Key),
68+
)
6469

6570
return nil
6671
},
@@ -107,7 +112,7 @@ func (r *RootCmd) provisionerKeysList() *serpent.Command {
107112
client := new(codersdk.Client)
108113
cmd := &serpent.Command{
109114
Use: "list",
110-
Short: "List provisioner keys",
115+
Short: "List provisioner keys in an organization",
111116
Aliases: []string{"ls"},
112117
Middleware: serpent.Chain(
113118
serpent.RequireNArgs(0),

0 commit comments

Comments
 (0)