From 756565b0c193197cf8ea01d1e78b2b63e392d8c9 Mon Sep 17 00:00:00 2001 From: Leonardo Luz Almeida Date: Tue, 29 Oct 2024 18:53:13 -0400 Subject: [PATCH] fix: properly populate the details in the status history (#50) Signed-off-by: Leonardo Luz Almeida --- internal/controller/service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/controller/service.go b/internal/controller/service.go index af5484a..264fe63 100644 --- a/internal/controller/service.go +++ b/internal/controller/service.go @@ -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) @@ -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 }