Skip to content

Commit

Permalink
Merge pull request #4492 from nickmango/feature/cla-mgr-email
Browse files Browse the repository at this point in the history
[#3498] Project Name
  • Loading branch information
nickmango authored Nov 27, 2024
2 parents 0c3f707 + f2c3294 commit 8f1989d
Show file tree
Hide file tree
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
Expand Up @@ -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>
`
)

Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
`
)

Expand Down
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
Expand Up @@ -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")
Expand All @@ -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 ([email protected])</li>")

}
Expand All @@ -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 ([email protected]) has been removed")

}

0 comments on commit 8f1989d

Please sign in to comment.