Skip to content

Commit

Permalink
Do not use a table for listing the result of an updated invitation
Browse files Browse the repository at this point in the history
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
  • Loading branch information
rdimitrov committed Jun 25, 2024
1 parent 742bab7 commit 84e4e7b
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions cmd/cli/app/project/role/role_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ package role

import (
"context"
"time"

"github.com/spf13/cobra"
"github.com/spf13/viper"
"google.golang.org/grpc"
Expand Down Expand Up @@ -72,15 +70,11 @@ func UpdateCommand(ctx context.Context, cmd *cobra.Command, _ []string, conn *gr

// If it was an invitation, print the invite details
if len(ret.Invitations) != 0 {
t := initializeTableForGrantListInvitations()
for _, r := range ret.Invitations {
expired := "No"
if r.Expired {
expired = "Yes"
}
t.AddRow(r.Email, r.Role, r.Sponsor, r.ExpiresAt.AsTime().Format(time.RFC3339), expired, r.Code)
// TODO: Add a url to the invite
cmd.Printf("Updated an invite for %s to %s on %s\n\nThe invitee can accept it by running: \n\nminder auth invite accept %s\n",
r.Email, r.Role, r.Project, r.Code)
}
t.Render()
return nil
}
// Otherwise, print the role assignments if it was about updating a role
Expand Down

0 comments on commit 84e4e7b

Please sign in to comment.