Skip to content

Commit 16a6426

Browse files
authored
Add version link to publish notification emails (#12247)
Include a direct link to the newly published version in publish notification emails sent to crate owners. The email body now displays the version link on a separate line for better visibility: View v1.0.0 here: https://crates.io/crates/foo/1.0.0
1 parent 02d7027 commit 16a6426

14 files changed

+53
-18
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
{% block content %}
44
Hello {{ recipient }}!
55

6-
A new version of the package {{ krate }} ({{ version }}) was published{{ publisher_info }} at {{ publish_time }}.
6+
A new version of {{ krate }} crate was published{{ publisher_info }} at {{ publish_time }}.
7+
8+
View v{{ version }} here: https://{{ domain }}/crates/{{ krate }}/{{ version }}
79

810
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings.
911
{% endblock %}

src/tests/krate/publish/snapshots/integration__krate__publish__basics__new_krate-5.snap

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

1212
Hello foo!
1313

14-
A new version of the package foo_new (1.0.0) was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
14+
A new version of foo_new crate was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
15+
16+
View v1.0.0 here: https://crates.io/crates/foo_new/1.0.0
1517

1618
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings.
1719

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ Content-Transfer-Encoding: quoted-printable
1111

1212
Hello foo!
1313

14-
A new version of the package foo (1.0.0) was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
14+
A new version of foo crate was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
15+
16+
View v1.0.0 here: https://crates.io/crates/foo/1.0.0
1517

1618
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings.
1719

@@ -49,7 +51,9 @@ Content-Transfer-Encoding: quoted-printable
4951

5052
Hello foo!
5153

52-
A new version of the package foo (1.1.0) was published by GitHub Actions (https://github.com/rust-lang/foo-rs/actions/runs/example-run-id) at [0000-00-00T00:00:00Z].
54+
A new version of foo crate was published by GitHub Actions (https://github.com/rust-lang/foo-rs/actions/runs/example-run-id) at [0000-00-00T00:00:00Z].
55+
56+
View v1.1.0 here: https://crates.io/crates/foo/1.1.0
5357

5458
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings.
5559

src/tests/routes/crates/snapshots/integration__routes__crates__delete__happy_path_new_crate-3.snap

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

1212
Hello foo!
1313

14-
A new version of the package foo (1.0.0) was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
14+
A new version of foo crate was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
15+
16+
View v1.0.0 here: https://crates.io/crates/foo/1.0.0
1517

1618
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings.
1719

src/tests/routes/crates/snapshots/integration__routes__crates__delete__happy_path_old_crate-3.snap

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

1212
Hello foo!
1313

14-
A new version of the package foo (1.0.0) was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
14+
A new version of foo crate was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
15+
16+
View v1.0.0 here: https://crates.io/crates/foo/1.0.0
1517

1618
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings.
1719

src/tests/routes/crates/snapshots/integration__routes__crates__delete__happy_path_really_old_crate-3.snap

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

1212
Hello foo!
1313

14-
A new version of the package foo (1.0.0) was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
14+
A new version of foo crate was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
15+
16+
View v1.0.0 here: https://crates.io/crates/foo/1.0.0
1517

1618
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings.
1719

src/tests/routes/users/update/snapshots/integration__routes__users__update__publish_notifications__unsubscribe_and_resubscribe-11.snap

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ Content-Transfer-Encoding: quoted-printable
1111

1212
Hello foo!
1313

14-
A new version of the package foo (1.0.0) was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
14+
A new version of foo crate was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
15+
16+
View v1.0.0 here: https://crates.io/crates/foo/1.0.0
1517

1618
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings.
1719

@@ -45,7 +47,9 @@ Content-Transfer-Encoding: quoted-printable
4547

4648
Hello foo!
4749

48-
A new version of the package foo (1.2.0) was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
50+
A new version of foo crate was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
51+
52+
View v1.2.0 here: https://crates.io/crates/foo/1.2.0
4953

5054
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings.
5155

src/tests/routes/users/update/snapshots/integration__routes__users__update__publish_notifications__unsubscribe_and_resubscribe-2.snap

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

1212
Hello foo!
1313

14-
A new version of the package foo (1.0.0) was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
14+
A new version of foo crate was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
15+
16+
View v1.0.0 here: https://crates.io/crates/foo/1.0.0
1517

1618
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings.
1719

src/tests/routes/users/update/snapshots/integration__routes__users__update__publish_notifications__unsubscribe_and_resubscribe-5.snap

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

1212
Hello foo!
1313

14-
A new version of the package foo (1.0.0) was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
14+
A new version of foo crate was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
15+
16+
View v1.0.0 here: https://crates.io/crates/foo/1.0.0
1517

1618
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings.
1719

src/tests/routes/users/update/snapshots/integration__routes__users__update__publish_notifications__unsubscribe_and_resubscribe-7.snap

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

1212
Hello foo!
1313

14-
A new version of the package foo (1.0.0) was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
14+
A new version of foo crate was published by your account (https://crates.io/users/foo) at [0000-00-00T00:00:00Z].
15+
16+
View v1.0.0 here: https://crates.io/crates/foo/1.0.0
1517

1618
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings.
1719

0 commit comments

Comments
 (0)