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

Add User Tier context to Notification Builder #425

Merged

Conversation

alexeykazakov
Copy link
Collaborator

So we can use the deactivation timeout days in the user-provisioned email templates from the corresponding user tier.

Part of https://issues.redhat.com/browse/SANDBOX-741

Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.54%. Comparing base (2184e62) to head (db0435b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #425      +/-   ##
==========================================
+ Coverage   78.46%   78.54%   +0.08%     
==========================================
  Files          49       49              
  Lines        2015     2023       +8     
==========================================
+ Hits         1581     1589       +8     
  Misses        376      376              
  Partials       58       58              
Files Coverage Δ
pkg/notification/notification_builder.go 88.88% <100.00%> (+1.08%) ⬆️

Copy link

if userTier.Spec.DeactivationTimeoutDays > 0 {
n.Spec.Context["DeactivationTimeoutDays"] = strconv.Itoa(userTier.Spec.DeactivationTimeoutDays)
} else {
n.Spec.Context["DeactivationTimeoutDays"] = "(unlimited)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea 👍

@alexeykazakov alexeykazakov merged commit 6a52cb3 into codeready-toolchain:master Aug 22, 2024
8 checks passed
@alexeykazakov alexeykazakov deleted the email-notification branch August 22, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants