• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / gotrue / 8430966195
65%

Build:
DEFAULT BRANCH: master
Ran 26 Mar 2024 04:52AM UTC
Jobs 1
Files 115
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Mar 2024 04:48AM UTC coverage: 65.351% (+0.07%) from 65.278%
8430966195

push

github

web-flow
fix: refactor email sending functions (#1495)

## What kind of change does this PR introduce?

The overall goal of this to expose a unified interface for emails. So
that we can potentially implement the Hook as a Custom Mailer. This is
to ensure that the impact on the existing code flow is minimal and that
we can turn off the Hook easily if needed.

After this change, we can do something similar to:

```
mailer. := a.Mailer()
if a.config.Hook.Enabled {
    mailer =   a.CustomMailer
} 
```

 and have all Hook logic live  in the custom Mailer



Specific changes are:

- Removes context from mailer as it is currently unused
- pushes down mailer into respective email sending methods
- Adds remaining send methods as API methods
- Fetch OTP Length and MaxFrequency from config
- Add convenience function for checking if an email was sent within
frequency limit
- push down `externalURL` and `referrer` into send function

---------

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>

79 of 84 new or added lines in 12 files covered. (94.05%)

8 existing lines in 5 files now uncovered.

7965 of 12188 relevant lines covered (65.35%)

60.1 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
45.69
1.15% internal/api/identity.go
4
59.01
5.0% internal/api/mail.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
65.63
-0.32% internal/api/signup.go
1
67.19
-1.93% internal/api/invite.go
1
63.8
-0.65% internal/api/user.go
1
75.95
-0.14% internal/api/external.go
4
59.01
5.0% internal/api/mail.go
Jobs
ID Job ID Ran Files Coverage
1 8430966195.1 26 Mar 2024 04:52AM UTC 115
65.35
GitHub Action Run
Source Files on build 8430966195
  • Tree
  • List 115
  • Changed 13
  • Source Changed 0
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 285c290a on github
  • Prev Build on master (#8413407801)
  • Next Build on master (#8431040963)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc