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

Issue 6688: Added project, role and initiator user URLs to email #16975

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions warehouse/templates/email/added-as-collaborator/body.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@
{% block reason %}
{% trans initiator_username=initiator_username, site=site %}You are receiving this because you have been added by {{ initiator_username }} to a project on {{ site }}.{% endtrans %}
{% endblock %}

Project "{{ project_name }}" details: https://pypi.org/project/{{ project_name }}
Role "{{ role }}" details: https://pypi.org/help/#collaborator-roles
Added by {{ initiator_username }}: https://pypi.org/user/{{ initiator_username }}
Comment on lines +27 to +29
Copy link
Member

Choose a reason for hiding this comment

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

A few things here:

First, these should use request.route_url(...) to generate the links, for example:

request.route_url('accounts.profile', username=initiator_username)

Second, these should be inline links within the message body, like:

you have been added by <a href="{{ request.route_url('accounts.profile', username=initiator_username) }}">{{ initiator_username }}</a> to a project

And not added at the end.

<a href="

4 changes: 4 additions & 0 deletions warehouse/templates/email/added-as-collaborator/body.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
{% endblock %}

{% block reason %}{% trans initiator_username=initiator_username, site=site %}You are receiving this because you have been added by {{ initiator_username }} to a project on {{ site }}.{% endtrans %}{% endblock %}

Project "{{ project_name }}" details: https://pypi.org/project/{{ project_name }}
Role "{{ role }}" details: https://pypi.org/help/#collaborator-roles
Added by {{ initiator_username }}: https://pypi.org/user/{{ initiator_username }}
Loading