hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

refactor(users): Move hardcoded email subjects to constants

Open SummerGram opened this issue 1 year ago • 12 comments

Type of Change

  • [ ] Bugfix
  • [ ] New feature
  • [ ] Enhancement
  • [x] Refactoring
  • [ ] Dependency updates
  • [ ] Documentation
  • [ ] CI/CD

Description

Change the hardcoded email subject to constants

Additional Changes

  • [ ] This PR modifies the API contract
  • [ ] This PR modifies the database schema
  • [ ] This PR modifies application configuration/environment variables

Motivation and Context

refactor based on this issue - #5940 link Closes #5940.

How did you test it?

change_apply_before.txt change_apply_after.txt

Checklist

  • [x] I formatted the code cargo +nightly fmt --all
  • [x] I addressed lints thrown by cargo clippy
  • [x] I reviewed the submitted code
  • [ ] I added unit tests for my changes where possible

SummerGram avatar Sep 26 '24 11:09 SummerGram

Review changes with SemanticDiff.

Analyzed 6 of 6 files.

Overall, the semantic diff is 12% smaller than the GitHub diff.

Filename Status
:heavy_check_mark: crates/router/src/consts.rs Analyzed
:heavy_check_mark: crates/router/src/workflows/api_key_expiry.rs 3.39% smaller
:heavy_check_mark: crates/router/src/services/email/types.rs Analyzed
:heavy_check_mark: crates/router/src/core/recon.rs 35.45% smaller
:heavy_check_mark: crates/router/src/core/user.rs 13.43% smaller
:heavy_check_mark: crates/router/src/consts/user.rs Analyzed

semanticdiff-com[bot] avatar Sep 26 '24 11:09 semanticdiff-com[bot]

Fix the PR title and link the issue. I'll approve the workflow.

ThisIsMani avatar Sep 26 '24 13:09 ThisIsMani

What is the title of the PR supposed be?

SummerGram avatar Sep 26 '24 13:09 SummerGram

@ThisIsMani

I link the issue in the motivation and context part but I still cannot pass the check.

SummerGram avatar Sep 26 '24 16:09 SummerGram

@ThisIsMani Please review the change.

SummerGram avatar Sep 27 '24 16:09 SummerGram

@ThisIsMani

Why is it failed to run?

SummerGram avatar Sep 30 '24 12:09 SummerGram

Please recheck the variables again.

ThisIsMani avatar Sep 30 '24 13:09 ThisIsMani

Please recheck the variables again.

Those failure in ci-pr is related to the variables name?

SummerGram avatar Sep 30 '24 13:09 SummerGram

You code is not compiling. That's why the run is failed.

You can check by running just check.

ThisIsMani avatar Sep 30 '24 13:09 ThisIsMani

You code is not compiling. That's why the run is failed.

You can check by running just check.

Thanks!

SummerGram avatar Sep 30 '24 16:09 SummerGram

Hi @ThisIsMani ,

I think "clonable" typo is not related to this PR.

SummerGram avatar Oct 01 '24 16:10 SummerGram

I think "clonable" typo is not related to this PR.

You can ignore that, shouldn't be a problem. Moreover, it's not a required check, so it shouldn't block your PR from being merged.

SanchithHegde avatar Oct 01 '24 19:10 SanchithHegde