Skip to content

Commit

Permalink
fix: properly populate the details in the status history
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Luz Almeida <[email protected]>
  • Loading branch information
leoluz committed Oct 29, 2024
1 parent 67cd661 commit cf86b02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/controller/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (s *Service) HandlePermission(ctx context.Context, ar *api.AccessRequest, a
return api.DeniedStatus, nil
}

details := ""
details := resp.Message
status, err := s.grantArgoCDAccess(ctx, ar, rt)
if err != nil {
details = fmt.Sprintf("Error granting Argo CD Access: %s", err)
Expand Down Expand Up @@ -339,5 +339,5 @@ type AllowedResponse struct {
// 1. verify if user is sudoer
// 2. verify if CR is approved
func Allowed(ctx context.Context, ar *api.AccessRequest, app *argocd.Application) (AllowedResponse, error) {
return AllowedResponse{Allowed: true, Message: "Change request http://test.com"}, nil
return AllowedResponse{Allowed: true, Message: "Associated ChangeRequest (we34f45)"}, nil
}

0 comments on commit cf86b02

Please sign in to comment.