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

Road Map and Email set-up #44

Closed
wants to merge 4 commits into from
Closed

Road Map and Email set-up #44

wants to merge 4 commits into from

Conversation

TimCsaky
Copy link
Contributor

@TimCsaky TimCsaky commented Mar 18, 2024

  • UpdateRoadmap component that could include email form
  • Road Map backend route, controller, service
  • set up Backend Email service (using CHES)
  • CHES connection environment variables
  • helm chart update

Description

Types of changes

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@TimCsaky TimCsaky force-pushed the email branch 2 times, most recently from b88ad6b to 9770d9d Compare March 19, 2024 19:03
UpdateRoadmap component that could include the email form
Road Map backend route, controller, service set up
Backend Email service (using CHES)
CHES connection environment variables
Copy link

github-actions bot commented Mar 19, 2024

Coverage Report (Frontend)

Totals Coverage
Statements: 20.44% ( 371 / 1815 )
Methods: 23.46% ( 76 / 324 )
Lines: 22.77% ( 232 / 1019 )
Branches: 13.35% ( 63 / 472 )

Copy link

github-actions bot commented Mar 19, 2024

Coverage Report (Application)

Totals Coverage
Statements: 44.37% ( 414 / 933 )
Methods: 33.68% ( 65 / 193 )
Lines: 59.36% ( 298 / 502 )
Branches: 21.43% ( 51 / 238 )

@TimCsaky TimCsaky marked this pull request as ready for review March 19, 2024 21:08
@TimCsaky TimCsaky marked this pull request as draft March 19, 2024 21:19
TimCsaky and others added 2 commits March 21, 2024 17:07
* @param {string} value The CSV string to parse
* @returns {string[]} An array of string values, or `value` if it is not a string
*/
export function parseCSV(value: string): Array<string> {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

router.use(requireSomeAuth);

// Send an email with the roadmap data
router.put('/', roadmapValidator.send, (req: Request, res: Response, next: NextFunction): void => {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 4 locations. Consider refactoring.

if (emailData.to && !Array.isArray(emailData.to)) {
emailData.to = parseCSV(emailData.to);
}
if (emailData.cc && !Array.isArray(emailData.cc)) {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 3 locations. Consider refactoring.

* @returns {Promise} An axios response
*/
send(activityId: string, emailData: any) {
if (emailData.to && !Array.isArray(emailData.to)) {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 3 locations. Consider refactoring.

if (emailData.cc && !Array.isArray(emailData.cc)) {
emailData.cc = parseCSV(emailData.cc);
}
if (emailData.bcc && !Array.isArray(emailData.bcc)) {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 3 locations. Consider refactoring.

Copy link

codeclimate bot commented Mar 22, 2024

Code Climate has analyzed commit 336cbc9 and detected 7 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1
Duplication 6

The test coverage on the diff in this pull request is 9.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 34.8%.

View more on Code Climate.

@kyle1morel kyle1morel closed this Mar 22, 2024
@kyle1morel kyle1morel deleted the email branch March 22, 2024 23:50
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.

2 participants