Skip to content

Commit

Permalink
[communitybridge#3498] Project Name
Browse files Browse the repository at this point in the history
- Used CLA Group Name in the add/remove CLA Manager notification email

Signed-off-by: Nick Mango <wanyaland+nickmango@gmail.com>
  • Loading branch information
nickmango committed Nov 27, 2024
1 parent 373849c commit f2c3294
Showing 2 changed files with 16 additions and 18 deletions.
20 changes: 10 additions & 10 deletions cla-backend-go/emails/cla_manager_templates.go
Original file line number Diff line number Diff line change
@@ -218,12 +218,12 @@ const (
//ClaManagerAddedEToUserTemplate email template for cla manager v2
ClaManagerAddedEToUserTemplate = `
<p>Hello {{.RecipientName}},</p>
<p>This is a notification email from EasyCLA regarding the project {{.Project.ExternalProjectName}} and CLA Group {{.CLAGroupName}}.</p>
<p>You have been added as a CLA Manager for the organization {{.CompanyName}} and the project {{.Project.ExternalProjectName}}. This means that you can now maintain the
list of employees allowed to contribute to the project {{.Project.ExternalProjectName}} on behalf of your company, as well as view and manage the list of your
<p>This is a notification email from EasyCLA regarding the CLA Group {{.CLAGroupName}}.</p>
<p>You have been added as a CLA Manager for the organization {{.CompanyName}} and the CLAGroup {{.CLAGroupName}}. This means that you can now maintain the
list of employees allowed to contribute to the CLA Group {{.CLAGroupName}} on behalf of your company, as well as view and manage the list of your
company’s CLA Managers for the CLA Group {{.CLAGroupName}}.</p>
<p> To get started, please log into the <a href="{{.CorporateConsole}}" target="_blank">EasyCLA Corporate Console</a>, and select your
company and then the project {{.Project.ExternalProjectName}}. From here you will be able to edit the list of approved employees and CLA Managers.</p>
company and then the project {{.CLAGroupName}}. From here you will be able to edit the list of approved employees and CLA Managers.</p>
`
)

@@ -252,10 +252,10 @@ const (
// ClaManagerAddedToCLAManagersTemplate is email template for
ClaManagerAddedToCLAManagersTemplate = `
<p>Hello {{.RecipientName}},</p>
<p>This is a notification email from EasyCLA regarding the project {{.Project.ExternalProjectName}} associated with the CLA Group {{.CLAGroupName}}.</p>
<p>The following user has been added as a CLA Manager from {{.CompanyName}} for the project {{.Project.ExternalProjectName}}. This means that they can now
maintain the list of employees allowed to contribute to {{.Project.ExternalProjectName}} on behalf of your company, as well as view and manage the
list of company’s CLA Managers for {{.Project.ExternalProjectName}}.</p>
<p>This is a notification email from EasyCLA regarding the CLA Group {{.CLAGroupName}}.</p>
<p>The following user has been added as a CLA Manager from {{.CompanyName}} for the CLA Group {{.CLAGroupName}}. This means that they can now
maintain the list of employees allowed to contribute to {{.CLAGroupName}} on behalf of your company, as well as view and manage the
list of company’s CLA Managers for CLA Group {{.CLAGroupName}}.</p>
<ul>
<li>{{.Name}} ({{.Email}})</li>
</ul>
@@ -287,8 +287,8 @@ const (
// ClaManagerDeletedToCLAManagersTemplate is template for
ClaManagerDeletedToCLAManagersTemplate = `
<p>Hello {{.RecipientName}},</p>
<p>This is a notification email from EasyCLA regarding the project {{.Project.ExternalProjectName}}.</p>
<p>{{.Name}} ({{.Email}}) has been removed as a CLA Manager from {{.CompanyName}} for the project {{.Project.ExternalProjectName}}.</p>
<p>This is a notification email from EasyCLA regarding the CLA Group {{.CLAGroupName}}.</p>
<p>{{.Name}} ({{.Email}}) has been removed as a CLA Manager from {{.CompanyName}} for CLA Group {{.CLAGroupName}}.</p>
`
)

14 changes: 6 additions & 8 deletions cla-backend-go/emails/cla_manager_templates_test.go
Original file line number Diff line number Diff line change
@@ -198,9 +198,9 @@ func TestClaManagerAddedEToUserTemplate(t *testing.T) {
params)
assert.NoError(t, err)
assert.Contains(t, result, "Hello JohnsClaManager")
assert.Contains(t, result, "regarding the project JohnsProjectExternal")
assert.Contains(t, result, "CLA Manager for the organization JohnsCompany and the project JohnsProjectExternal")
assert.Contains(t, result, "allowed to contribute to the project JohnsProjectExternal")
assert.Contains(t, result, "the CLA Group JohnsProject.")
assert.Contains(t, result, "organization JohnsCompany and the CLAGroup JohnsProject")
assert.Contains(t, result, "allowed to contribute to the CLA Group JohnsProject")
assert.Contains(t, result, "CLA Managers for the CLA Group JohnsProject")
assert.Contains(t, result, "<a href=\"http://CorporateURL.com\" target=\"_blank\">")
assert.Contains(t, result, "and then the project JohnsProject")
@@ -224,10 +224,9 @@ func TestClaManagerAddedToCLAManagersTemplate(t *testing.T) {
params)
assert.NoError(t, err)
assert.Contains(t, result, "Hello JohnsClaManager")
assert.Contains(t, result, "regarding the project JohnsProjectExternal associated with the CLA Group JohnsProject")
assert.Contains(t, result, "CLA Manager from JohnsCompany for the project JohnsProjectExternal")
assert.Contains(t, result, "contribute to JohnsProjectExternal")
assert.Contains(t, result, "CLA Managers for JohnsProjectExternal")
assert.Contains(t, result, "regarding the CLA Group JohnsProject")
assert.Contains(t, result, "contribute to JohnsProject")
assert.Contains(t, result, "CLA Managers for CLA Group JohnsProject")
assert.Contains(t, result, "<li>John (john@example.com)</li>")

}
@@ -250,7 +249,6 @@ func TestClaManagerDeletedToCLAManagersTemplate(t *testing.T) {
params)
assert.NoError(t, err)
assert.Contains(t, result, "Hello JohnsClaManager")
assert.Contains(t, result, "regarding the project JohnsProject")
assert.Contains(t, result, "John (john@example.com) has been removed")

}

0 comments on commit f2c3294

Please sign in to comment.