Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename RiskCalculationStatus to ChangeAnalysisStatus #348

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down
14 changes: 7 additions & 7 deletions changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}

Expand Down Expand Up @@ -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{}
}
Expand All @@ -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(),
Expand Down
Loading