Skip to content

Commit b9b1513

Browse files
committed
email: Adjust config_created when auth user is the recipient
1 parent 296487b commit b9b1513

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/controllers/trustpub/github_configs/create/snapshots/crates_io__controllers__trustpub__github_configs__create__tests__happy_path-3.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Content-Transfer-Encoding: quoted-printable
1111

1212
Hello foo!
1313

14-
crates.io user foo added a new "Trusted Publishing" configuration for GitHub Actions to a crate that you manage ("foo"). Trusted publishers act as trusted users and can publish new versions of the crate automatically.
14+
You added a new "Trusted Publishing" configuration for GitHub Actions to your crate "foo". Trusted publishers act as trusted users and can publish new versions of the crate automatically.
1515

1616
Trusted Publishing configuration:
1717

src/email/templates/config_created/body.txt.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
{% block content %}
44
Hello {{ recipient }}!
55

6+
{% if recipient == auth_user.gh_login -%}
7+
You added a new "Trusted Publishing" configuration for GitHub Actions to your crate "{{ krate.name }}". Trusted publishers act as trusted users and can publish new versions of the crate automatically.
8+
{%- else -%}
69
crates.io user {{ auth_user.gh_login }} added a new "Trusted Publishing" configuration for GitHub Actions to a crate that you manage ("{{ krate.name }}"). Trusted publishers act as trusted users and can publish new versions of the crate automatically.
10+
{%- endif %}
711

812
Trusted Publishing configuration:
913

src/tests/krate/publish/snapshots/crates_io__tests__krate__publish__trustpub__full_flow-11.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Content-Transfer-Encoding: quoted-printable
2828

2929
Hello foo!
3030

31-
crates.io user foo added a new "Trusted Publishing" configuration for GitHub Actions to a crate that you manage ("foo"). Trusted publishers act as trusted users and can publish new versions of the crate automatically.
31+
You added a new "Trusted Publishing" configuration for GitHub Actions to your crate "foo". Trusted publishers act as trusted users and can publish new versions of the crate automatically.
3232

3333
Trusted Publishing configuration:
3434

0 commit comments

Comments
 (0)