From 6c4c6deeb8eda5c02021d759d0023eff40dd7a19 Mon Sep 17 00:00:00 2001 From: TP Honey Date: Tue, 17 Dec 2024 09:24:06 +0000 Subject: [PATCH] rebase for autotag (#348) --- auth/auth.go | 6 +++--- changes.go | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/auth/auth.go b/auth/auth.go index 8f702f9..4c7ebf2 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -235,16 +235,16 @@ func (n *natsTokenClient) GetJWT() (string, error) { // If we don't yet have a JWT, generate one if n.jwt == "" { err := n.generateJWT(ctx) - if err != nil { + err = fmt.Errorf("error generating JWT: %w", err) span.SetStatus(codes.Error, err.Error()) return "", err } } claims, err := jwt.DecodeUserClaims(n.jwt) - if err != nil { + err = fmt.Errorf("error decoding JWT: %w", err) span.SetStatus(codes.Error, err.Error()) return n.jwt, err } @@ -258,8 +258,8 @@ func (n *natsTokenClient) GetJWT() (string, error) { if vr.IsBlocking(true) { // Regenerate the token err := n.generateJWT(ctx) - if err != nil { + err = fmt.Errorf("error validating JWT: %w", err) span.SetStatus(codes.Error, err.Error()) return "", err } diff --git a/changes.go b/changes.go index 8c56e5e..54780a3 100644 --- a/changes.go +++ b/changes.go @@ -258,11 +258,11 @@ func (r *GetChangeRisksResponse) ToMap() map[string]any { } return map[string]any{ - "risks": risks, - "numHighRisk": rmd.GetNumHighRisk(), - "numMediumRisk": rmd.GetNumMediumRisk(), - "numLowRisk": rmd.GetNumLowRisk(), - "riskCalculationStatus": rmd.GetRiskCalculationStatus().ToMap(), + "risks": risks, + "numHighRisk": rmd.GetNumHighRisk(), + "numMediumRisk": rmd.GetNumMediumRisk(), + "numLowRisk": rmd.GetNumLowRisk(), + "changeAnalysisStatus": rmd.GetChangeAnalysisStatus().ToMap(), } } @@ -354,7 +354,7 @@ func (cp *ChangeProperties) ToMap() map[string]any { } } -func (rcs *RiskCalculationStatus) ToMap() map[string]any { +func (rcs *ChangeAnalysisStatus) ToMap() map[string]any { if rcs == nil { return map[string]any{} } @@ -371,7 +371,7 @@ func (rcs *RiskCalculationStatus) ToMap() map[string]any { } } -func (m *RiskCalculationStatus_ProgressMilestone) ToMap() map[string]any { +func (m *ChangeAnalysisStatus_ProgressMilestone) ToMap() map[string]any { return map[string]any{ "description": m.GetDescription(), "status": m.GetStatus().String(),