Skip to content

Commit

Permalink
rebase for autotag (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
tphoney authored Dec 17, 2024
1 parent 6b2abf8 commit 6c4c6de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
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

0 comments on commit 6c4c6de

Please sign in to comment.