From ebb4ad8f1ede0a6f3b9c6eaa641af2350ffbf928 Mon Sep 17 00:00:00 2001
From: William Woodruff
Date: Mon, 5 Jun 2023 23:59:42 -0400
Subject: [PATCH 1/5] oidc/models/google: add missing members
Signed-off-by: William Woodruff
---
warehouse/oidc/models/google.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/warehouse/oidc/models/google.py b/warehouse/oidc/models/google.py
index f637dad51d23..dadfde6432e7 100644
--- a/warehouse/oidc/models/google.py
+++ b/warehouse/oidc/models/google.py
@@ -77,6 +77,13 @@ def __lookup_no_sub__(klass, signed_claims: SignedClaims) -> Query | None:
__lookup_no_sub__,
]
+ @property
+ def publisher_name(self):
+ return "Google"
+
+ def publisher_url(self, claims=None):
+ return "https://accounts.google.com"
+
@property
def email_verified(self):
# We don't consider a claim set valid unless `email_verified` is true;
From c3cfc1ba4bf827508914d9309d4cf5ba313cafb0 Mon Sep 17 00:00:00 2001
From: William Woodruff
Date: Tue, 6 Jun 2023 00:27:33 -0400
Subject: [PATCH 2/5] tests, warehouse: general publishing emails
This makes the `trusted-publisher-added` and
`trusted-publisher-removed` email structures a little more
generic, allowing them to be re-used over both
GitHub and Google publishers. Future publishers will require
additional accommodations.
See #13551.
Signed-off-by: William Woodruff
---
tests/unit/accounts/test_views.py | 2 +-
tests/unit/email/test_init.py | 6 +--
tests/unit/oidc/models/test_google.py | 10 +++++
warehouse/accounts/views.py | 2 +-
warehouse/email/__init__.py | 12 +-----
warehouse/locale/messages.pot | 39 +++++++++++--------
.../email/trusted-publisher-added/body.html | 19 ++++++---
.../email/trusted-publisher-added/body.txt | 19 ++++++---
.../email/trusted-publisher-removed/body.html | 19 ++++++---
.../email/trusted-publisher-removed/body.txt | 21 ++++++----
10 files changed, 91 insertions(+), 58 deletions(-)
diff --git a/tests/unit/accounts/test_views.py b/tests/unit/accounts/test_views.py
index a817ce465d03..f93c51f505f5 100644
--- a/tests/unit/accounts/test_views.py
+++ b/tests/unit/accounts/test_views.py
@@ -3627,7 +3627,7 @@ def test_add_pending_github_oidc_publisher(self, monkeypatch, db_request):
assert db_request.session.flash.calls == [
pretend.call(
- "Registered a new publishing publisher to create "
+ "Registered a new pending publisher to create "
"the project 'some-project-name'.",
queue="success",
)
diff --git a/tests/unit/email/test_init.py b/tests/unit/email/test_init.py
index 7a2a351a4d9a..9cca9d8cc008 100644
--- a/tests/unit/email/test_init.py
+++ b/tests/unit/email/test_init.py
@@ -5819,11 +5819,7 @@ def test_trusted_publisher_emails(
assert result == {
"username": stub_user.username,
"project_name": project_name,
- "publisher_name": "fakepublisher",
- "publisher_workflow": "fakespecifier",
- "publisher_repository_owner": "fakeowner",
- "publisher_repository_name": "fakerepository",
- "publisher_environment": "fakeenvironment",
+ "publisher": fakepublisher,
}
subject_renderer.assert_()
body_renderer.assert_(username=stub_user.username, project_name=project_name)
diff --git a/tests/unit/oidc/models/test_google.py b/tests/unit/oidc/models/test_google.py
index bba98261e495..739b9b903922 100644
--- a/tests/unit/oidc/models/test_google.py
+++ b/tests/unit/oidc/models/test_google.py
@@ -27,6 +27,16 @@ def test_lookup_strategies():
class TestGooglePublisher:
+ def test_publisher_name(self):
+ publisher = google.GooglePublisher(email="fake@example.com")
+
+ assert publisher.publisher_name == "Google"
+
+ def test_publisher_url(self):
+ publisher = google.GooglePublisher(email="fake@example.com")
+
+ assert publisher.publisher_url() == "https://accounts.google.com"
+
def test_stringifies_as_email(self):
publisher = google.GooglePublisher(email="fake@example.com")
diff --git a/warehouse/accounts/views.py b/warehouse/accounts/views.py
index f782ff89ca0d..5db928fa5b6d 100644
--- a/warehouse/accounts/views.py
+++ b/warehouse/accounts/views.py
@@ -1584,7 +1584,7 @@ def add_pending_github_oidc_publisher(self):
self.request.session.flash(
self.request._(
- "Registered a new publishing publisher to create "
+ "Registered a new pending publisher to create "
f"the project '{pending_publisher.project_name}'."
),
queue="success",
diff --git a/warehouse/email/__init__.py b/warehouse/email/__init__.py
index 3fd57121ac06..d7ec2bdea9bd 100644
--- a/warehouse/email/__init__.py
+++ b/warehouse/email/__init__.py
@@ -992,11 +992,7 @@ def send_trusted_publisher_added_email(request, user, project_name, publisher):
return {
"username": request.user.username,
"project_name": project_name,
- "publisher_name": publisher.publisher_name,
- "publisher_workflow": str(publisher),
- "publisher_repository_owner": publisher.repository_owner,
- "publisher_repository_name": publisher.repository_name,
- "publisher_environment": publisher.environment,
+ "publisher": publisher,
}
@@ -1006,11 +1002,7 @@ def send_trusted_publisher_removed_email(request, user, project_name, publisher)
return {
"username": request.user.username,
"project_name": project_name,
- "publisher_name": publisher.publisher_name,
- "publisher_workflow": str(publisher),
- "publisher_repository_owner": publisher.repository_owner,
- "publisher_repository_name": publisher.repository_name,
- "publisher_environment": publisher.environment,
+ "publisher": publisher,
}
diff --git a/warehouse/locale/messages.pot b/warehouse/locale/messages.pot
index dd32a5cd0bdd..a3aee526022e 100644
--- a/warehouse/locale/messages.pot
+++ b/warehouse/locale/messages.pot
@@ -301,7 +301,7 @@ msgid ""
msgstr ""
#: warehouse/accounts/views.py:1586
-msgid "Registered a new publishing publisher to create "
+msgid "Registered a new pending publisher to create "
msgstr ""
#: warehouse/accounts/views.py:1623 warehouse/accounts/views.py:1636
@@ -2375,15 +2375,15 @@ msgstr ""
msgid "Publisher name"
msgstr ""
-#: warehouse/templates/email/trusted-publisher-added/body.html:31
-#: warehouse/templates/email/trusted-publisher-removed/body.html:29
+#: warehouse/templates/email/trusted-publisher-added/body.html:32
+#: warehouse/templates/email/trusted-publisher-removed/body.html:30
#: warehouse/templates/manage/account/publishing.html:173
#: warehouse/templates/manage/project/publishing.html:46
msgid "Workflow"
msgstr ""
-#: warehouse/templates/email/trusted-publisher-added/body.html:32
-#: warehouse/templates/email/trusted-publisher-removed/body.html:30
+#: warehouse/templates/email/trusted-publisher-added/body.html:33
+#: warehouse/templates/email/trusted-publisher-removed/body.html:31
#: warehouse/templates/includes/packaging/project-data.html:117
#: warehouse/templates/manage/account/publishing.html:47
#: warehouse/templates/manage/organization/roles.html:53
@@ -2399,27 +2399,38 @@ msgstr ""
msgid "Owner"
msgstr ""
-#: warehouse/templates/email/trusted-publisher-added/body.html:33
-#: warehouse/templates/email/trusted-publisher-removed/body.html:31
+#: warehouse/templates/email/trusted-publisher-added/body.html:34
+#: warehouse/templates/email/trusted-publisher-removed/body.html:32
#: warehouse/templates/manage/account/publishing.html:172
#: warehouse/templates/manage/project/publishing.html:45
msgid "Repository"
msgstr ""
-#: warehouse/templates/email/trusted-publisher-added/body.html:35
-#: warehouse/templates/email/trusted-publisher-removed/body.html:33
+#: warehouse/templates/email/trusted-publisher-added/body.html:36
+#: warehouse/templates/email/trusted-publisher-removed/body.html:34
msgid "Environment"
msgstr ""
+#: warehouse/templates/email/trusted-publisher-added/body.html:39
+#: warehouse/templates/email/trusted-publisher-removed/body.html:37
+#: warehouse/templates/includes/accounts/profile-public-email.html:17
+msgid "Email"
+msgstr ""
+
#: warehouse/templates/email/trusted-publisher-added/body.html:41
+#: warehouse/templates/email/trusted-publisher-removed/body.html:39
+msgid "Subject"
+msgstr ""
+
+#: warehouse/templates/email/trusted-publisher-added/body.html:48
msgid ""
"If you did not make this change and you think it was made maliciously, "
"you can remove it from the project via the \"Publishing\" tab on the "
"project's page."
msgstr ""
-#: warehouse/templates/email/trusted-publisher-added/body.html:48
-#: warehouse/templates/email/trusted-publisher-removed/body.html:46
+#: warehouse/templates/email/trusted-publisher-added/body.html:55
+#: warehouse/templates/email/trusted-publisher-removed/body.html:53
#, python-format
msgid ""
"If you are unable to revert the change and need to do so, you can email "
@@ -2434,7 +2445,7 @@ msgid ""
"from a project (%(project_name)s) that you manage."
msgstr ""
-#: warehouse/templates/email/trusted-publisher-removed/body.html:39
+#: warehouse/templates/email/trusted-publisher-removed/body.html:46
msgid ""
"If you did not make this change and you think it was made in error, you "
"can check the \"Security history\" tab on the project's page."
@@ -2676,10 +2687,6 @@ msgstr ""
msgid "%(username)s has not uploaded any projects to PyPI, yet."
msgstr ""
-#: warehouse/templates/includes/accounts/profile-public-email.html:17
-msgid "Email"
-msgstr ""
-
#: warehouse/templates/includes/manage/manage-organization-menu.html:14
#, python-format
msgid "Navigation for managing %(organization)s"
diff --git a/warehouse/templates/email/trusted-publisher-added/body.html b/warehouse/templates/email/trusted-publisher-added/body.html
index 33aa8f9b975b..66fdaf7cf2f0 100644
--- a/warehouse/templates/email/trusted-publisher-added/body.html
+++ b/warehouse/templates/email/trusted-publisher-added/body.html
@@ -27,12 +27,19 @@
{% trans %}Publisher information{% endtrans %}:
- - {% trans %}Publisher name{% endtrans %}: {{ publisher_name }}
- - {% trans %}Workflow{% endtrans %}: {{ publisher_workflow }}
- - {% trans %}Owner{% endtrans %}: {{ publisher_repository_owner }}
- - {% trans %}Repository{% endtrans %}: {{ publisher_repository_name }}
- {% if publisher_environment %}
- - {% trans %}Environment{% endtrans %}: {{ publisher_environment }}
+ - {% trans %}Publisher name{% endtrans %}: {{ publisher.publisher_name }}
+ {% if publisher.publisher_name == "GitHub" %}
+ - {% trans %}Workflow{% endtrans %}: {{ publisher }}
+ - {% trans %}Owner{% endtrans %}: {{ publisher.repository_owner }}
+ - {% trans %}Repository{% endtrans %}: {{ publisher.repository_name }}
+ {% if publisher.environment %}
+ - {% trans %}Environment{% endtrans %}: {{ publisher.environment }}
+ {% endif %}
+ {% elif publisher.publisher_name == "Google" %}
+ - {% trans %}Email{% endtrans %}: {{ publisher.email }}
+ {% if publisher.sub %}
+ - {% trans %}Subject{% endtrans %}: {{ publisher.sub }}
+ {% endif %}
{% endif %}
diff --git a/warehouse/templates/email/trusted-publisher-added/body.txt b/warehouse/templates/email/trusted-publisher-added/body.txt
index dea8119bc2ef..e5a4e0cc3065 100644
--- a/warehouse/templates/email/trusted-publisher-added/body.txt
+++ b/warehouse/templates/email/trusted-publisher-added/body.txt
@@ -22,12 +22,19 @@ users and can create project releases automatically.
{% trans %}Publisher information{% endtrans %}:
-* {% trans %}Publisher{% endtrans %}: {{ publisher_name }}
-* {% trans %}Workflow{% endtrans %}: {{ publisher_workflow }}
-* {% trans %}Owner{% endtrans %}: {{ publisher_repository_owner }}
-* {% trans %}Repository{% endtrans %}: {{ publisher_repository_name }}
-{%- if publisher_environment %}
-* {% trans %}Environment{% endtrans %}: {{ publisher_environment }}
+* {% trans %}Publisher{% endtrans %}: {{ publisher.publisher_name }}
+{%- if publisher.publisher_name == "GitHub" %}
+* {% trans %}Workflow{% endtrans %}: {{ publisher }}
+* {% trans %}Owner{% endtrans %}: {{ publisher.repository_owner }}
+* {% trans %}Repository{% endtrans %}: {{ publisher.repository_name }}
+{%- if publisher.environment %}
+* {% trans %}Environment{% endtrans %}: {{ publisher.environment }}
+{%- endif %}
+{%- elif publisher.publisher_name == "Google" %}
+* {% trans %}Email{% endtrans %}: {{ publisher.email }}
+{%- if publisher.sub %}
+* {% trans %}Subject{% endtrans %}: {{ publisher.sub }}
+{%- endif %}
{%- endif %}
{% trans %}
diff --git a/warehouse/templates/email/trusted-publisher-removed/body.html b/warehouse/templates/email/trusted-publisher-removed/body.html
index a37f5b636cb2..0aaaab8501f9 100644
--- a/warehouse/templates/email/trusted-publisher-removed/body.html
+++ b/warehouse/templates/email/trusted-publisher-removed/body.html
@@ -25,12 +25,19 @@
{% trans %}Publisher information{% endtrans %}:
- - {% trans %}Publisher name{% endtrans %}: {{ publisher_name }}
- - {% trans %}Workflow{% endtrans %}: {{ publisher_workflow }}
- - {% trans %}Owner{% endtrans %}: {{ publisher_repository_owner }}
- - {% trans %}Repository{% endtrans %}: {{ publisher_repository_name }}
- {% if publisher_environment %}
- - {% trans %}Environment{% endtrans %}: {{ publisher_environment }}
+ - {% trans %}Publisher name{% endtrans %}: {{ publisher.publisher_name }}
+ {% if publisher.publisher_name == "GitHub" %}
+ - {% trans %}Workflow{% endtrans %}: {{ publisher }}
+ - {% trans %}Owner{% endtrans %}: {{ publisher.repository_owner }}
+ - {% trans %}Repository{% endtrans %}: {{ publisher.repository_name }}
+ {% if publisher.environment %}
+ - {% trans %}Environment{% endtrans %}: {{ publisher.environment }}
+ {% endif %}
+ {% elif publisher.publisher_name == "Google" %}
+ - {% trans %}Email{% endtrans %}: {{ publisher.email }}
+ {% if publisher.sub %}
+ - {% trans %}Subject{% endtrans %}: {{ publisher.sub }}
+ {% endif %}
{% endif %}
diff --git a/warehouse/templates/email/trusted-publisher-removed/body.txt b/warehouse/templates/email/trusted-publisher-removed/body.txt
index 44d1891cf7d8..9fd512e0d145 100644
--- a/warehouse/templates/email/trusted-publisher-removed/body.txt
+++ b/warehouse/templates/email/trusted-publisher-removed/body.txt
@@ -21,13 +21,20 @@ PyPI user {{ username }} has removed a trusted publisher from a project
{% trans %}Publisher information{% endtrans %}:
-* {% trans %}Publisher{% endtrans %}: {{ publisher_name }}
-* {% trans %}Workflow{% endtrans %}: {{ publisher_workflow }}
-* {% trans %}Owner{% endtrans %}: {{ publisher_repository_owner }}
-* {% trans %}Repository{% endtrans %}: {{ publisher_repository_name }}
-{%- if publisher_environment %}
-* {% trans %}Environment{% endtrans %}: {{ publisher_environment }}
-{% endif %}
+* {% trans %}Publisher{% endtrans %}: {{ publisher.publisher_name }}
+{%- if publisher.publisher_name == "GitHub" %}
+* {% trans %}Workflow{% endtrans %}: {{ publisher }}
+* {% trans %}Owner{% endtrans %}: {{ publisher.repository_owner }}
+* {% trans %}Repository{% endtrans %}: {{ publisher.repository_name }}
+{%- if publisher.environment %}
+* {% trans %}Environment{% endtrans %}: {{ publisher.environment }}
+{%- endif %}
+{%- elif publisher.publisher_name == "Google" %}
+* {% trans %}Email{% endtrans %}: {{ publisher.email }}
+{%- if publisher.sub %}
+* {% trans %}Subject{% endtrans %}: {{ publisher.sub }}
+{%- endif %}
+{%- endif %}
{% trans %}
If you did not make this change and you think it was made in error, you can
From f2c721a6fdcb080b0c1e1bbe1eb243bdaec77cab Mon Sep 17 00:00:00 2001
From: William Woodruff
Date: Tue, 6 Jun 2023 09:52:27 -0400
Subject: [PATCH 3/5] warehouse: make publisher_url optional
Signed-off-by: William Woodruff
---
warehouse/admin/templates/admin/projects/detail.html | 6 +++++-
warehouse/admin/templates/admin/users/detail.html | 6 +++++-
warehouse/oidc/models/_core.py | 2 +-
warehouse/oidc/models/google.py | 2 +-
warehouse/templates/manage/project/history.html | 6 +++++-
5 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/warehouse/admin/templates/admin/projects/detail.html b/warehouse/admin/templates/admin/projects/detail.html
index 38edc745b38b..aa3a8041e825 100644
--- a/warehouse/admin/templates/admin/projects/detail.html
+++ b/warehouse/admin/templates/admin/projects/detail.html
@@ -249,7 +249,11 @@ Remove role for {{ role.user.user
{% for pub in oidc_publishers %}
| {{ pub.publisher_name }} |
- {{ pub.repository }} |
+ {% if pub.publisher_url() %}
+ {{ pub.publisher_url() }} |
+ {% else %}
+ N/A |
+ {% endif %}
{{ pub }} |
{% endfor %}
diff --git a/warehouse/admin/templates/admin/users/detail.html b/warehouse/admin/templates/admin/users/detail.html
index c8bedb26b28f..d9a27fef8e38 100644
--- a/warehouse/admin/templates/admin/users/detail.html
+++ b/warehouse/admin/templates/admin/users/detail.html
@@ -470,7 +470,11 @@ Pending OpenID Connect Publishers
| {{ pub.project_name }} |
{{ pub.publisher_name }} |
- {{ pub.repository }} |
+ {% if pub.publisher_url() %}
+ {{ pub.publisher_url() }} |
+ {% else %}
+ N/A |
+ {% endif %}
{{ pub }} |
{% endfor %}
diff --git a/warehouse/oidc/models/_core.py b/warehouse/oidc/models/_core.py
index 725e70082989..b6814a1efe62 100644
--- a/warehouse/oidc/models/_core.py
+++ b/warehouse/oidc/models/_core.py
@@ -211,7 +211,7 @@ def publisher_name(self) -> str: # pragma: no cover
# Only concrete subclasses are constructed.
raise NotImplementedError
- def publisher_url(self, claims=None) -> str: # pragma: no cover
+ def publisher_url(self, claims=None) -> str | None: # pragma: no cover
"""
NOTE: This is **NOT** a `@property` because we pass `claims` to it.
When calling, make sure to use `publisher_url()`
diff --git a/warehouse/oidc/models/google.py b/warehouse/oidc/models/google.py
index dadfde6432e7..d7c86dc3b12c 100644
--- a/warehouse/oidc/models/google.py
+++ b/warehouse/oidc/models/google.py
@@ -82,7 +82,7 @@ def publisher_name(self):
return "Google"
def publisher_url(self, claims=None):
- return "https://accounts.google.com"
+ return None
@property
def email_verified(self):
diff --git a/warehouse/templates/manage/project/history.html b/warehouse/templates/manage/project/history.html
index 7d06d759766d..05e1b733c377 100644
--- a/warehouse/templates/manage/project/history.html
+++ b/warehouse/templates/manage/project/history.html
@@ -234,11 +234,15 @@ {% trans %}Security history{% endtrans %}
{% endif %}
- {% trans %}Creator: {% endtrans %}
+ {% trans %}Creator{% endtrans %}:
+ {% if event.additional.publisher_url %}
{{ event.additional.publisher_name }}:
{{ event.additional.publisher_url }}
+ {% else %}
+ {{ event.additional.publisher_name }}
+ {% endif %}
{% if event.additional.workflow %}
{% trans %}Workflow:{% endtrans %} {{ event.additional.workflow }}
{% endif %}
From f817a6ff1d9a00de50c87fa9be2d45c410a1ccb0 Mon Sep 17 00:00:00 2001
From: William Woodruff
Date: Tue, 6 Jun 2023 10:51:59 -0400
Subject: [PATCH 4/5] warehouse: `make translations`
Signed-off-by: William Woodruff
---
warehouse/locale/messages.pot | 50 +++++++++++++++++------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/warehouse/locale/messages.pot b/warehouse/locale/messages.pot
index a3aee526022e..554b80e84771 100644
--- a/warehouse/locale/messages.pot
+++ b/warehouse/locale/messages.pot
@@ -3168,7 +3168,7 @@ msgstr ""
#: warehouse/templates/manage/account.html:504
#: warehouse/templates/manage/account.html:523
-#: warehouse/templates/manage/project/history.html:268
+#: warehouse/templates/manage/project/history.html:272
msgid "Reason:"
msgstr ""
@@ -3309,13 +3309,13 @@ msgstr ""
#: warehouse/templates/manage/account.html:620
#: warehouse/templates/manage/account.html:643
-#: warehouse/templates/manage/project/history.html:259
-#: warehouse/templates/manage/project/history.html:266
+#: warehouse/templates/manage/project/history.html:263
+#: warehouse/templates/manage/project/history.html:270
msgid "Token name:"
msgstr ""
#: warehouse/templates/manage/account.html:637
-#: warehouse/templates/manage/project/history.html:261
+#: warehouse/templates/manage/project/history.html:265
msgid "API token removed"
msgstr ""
@@ -3367,7 +3367,7 @@ msgstr ""
#: warehouse/templates/manage/account.html:683
#: warehouse/templates/manage/organization/history.html:201
-#: warehouse/templates/manage/project/history.html:300
+#: warehouse/templates/manage/project/history.html:304
#: warehouse/templates/manage/team/history.html:108
msgid "Event"
msgstr ""
@@ -3375,8 +3375,8 @@ msgstr ""
#: warehouse/templates/manage/account.html:684
#: warehouse/templates/manage/organization/history.html:202
#: warehouse/templates/manage/organization/history.html:211
-#: warehouse/templates/manage/project/history.html:301
-#: warehouse/templates/manage/project/history.html:310
+#: warehouse/templates/manage/project/history.html:305
+#: warehouse/templates/manage/project/history.html:314
#: warehouse/templates/manage/team/history.html:109
#: warehouse/templates/manage/team/history.html:118
msgid "Time"
@@ -3399,7 +3399,7 @@ msgstr ""
#: warehouse/templates/manage/account.html:698
#: warehouse/templates/manage/organization/history.html:217
-#: warehouse/templates/manage/project/history.html:316
+#: warehouse/templates/manage/project/history.html:320
#: warehouse/templates/manage/team/history.html:124
msgid "Device Info"
msgstr ""
@@ -3735,7 +3735,7 @@ msgid "Submitted by:"
msgstr ""
#: warehouse/templates/manage/manage_base.html:546
-#: warehouse/templates/manage/project/history.html:243
+#: warehouse/templates/manage/project/history.html:247
msgid "Workflow:"
msgstr ""
@@ -4707,7 +4707,7 @@ msgid "Revoked by:"
msgstr ""
#: warehouse/templates/manage/organization/history.html:198
-#: warehouse/templates/manage/project/history.html:297
+#: warehouse/templates/manage/project/history.html:301
#: warehouse/templates/manage/team/history.html:105
#, python-format
msgid "Security history for %(source_name)s"
@@ -5311,13 +5311,13 @@ msgid "Short-lived API token created"
msgstr ""
#: warehouse/templates/manage/project/history.html:222
-#: warehouse/templates/manage/project/history.html:248
-#: warehouse/templates/manage/project/history.html:262
+#: warehouse/templates/manage/project/history.html:252
+#: warehouse/templates/manage/project/history.html:266
msgid "Permissions: Can upload to this project"
msgstr ""
#: warehouse/templates/manage/project/history.html:225
-#: warehouse/templates/manage/project/history.html:256
+#: warehouse/templates/manage/project/history.html:260
msgid "Expiration:"
msgstr ""
@@ -5330,47 +5330,47 @@ msgid "Expired"
msgstr ""
#: warehouse/templates/manage/project/history.html:237
-msgid "Creator:"
+msgid "Creator"
msgstr ""
-#: warehouse/templates/manage/project/history.html:247
+#: warehouse/templates/manage/project/history.html:251
msgid "API token created"
msgstr ""
-#: warehouse/templates/manage/project/history.html:251
-#: warehouse/templates/manage/project/history.html:264
+#: warehouse/templates/manage/project/history.html:255
+#: warehouse/templates/manage/project/history.html:268
msgid "Controlled by:"
msgstr ""
-#: warehouse/templates/manage/project/history.html:273
+#: warehouse/templates/manage/project/history.html:277
msgid "Trusted publisher added"
msgstr ""
-#: warehouse/templates/manage/project/history.html:276
+#: warehouse/templates/manage/project/history.html:280
msgid "Trusted publisher removed"
msgstr ""
-#: warehouse/templates/manage/project/history.html:281
+#: warehouse/templates/manage/project/history.html:285
msgid "2FA requirement enabled"
msgstr ""
-#: warehouse/templates/manage/project/history.html:283
+#: warehouse/templates/manage/project/history.html:287
msgid "Enabled by:"
msgstr ""
-#: warehouse/templates/manage/project/history.html:286
+#: warehouse/templates/manage/project/history.html:290
msgid "2FA requirement disabled"
msgstr ""
-#: warehouse/templates/manage/project/history.html:288
+#: warehouse/templates/manage/project/history.html:292
msgid "Disabled by:"
msgstr ""
-#: warehouse/templates/manage/project/history.html:302
+#: warehouse/templates/manage/project/history.html:306
msgid "Additional info"
msgstr ""
-#: warehouse/templates/manage/project/history.html:314
+#: warehouse/templates/manage/project/history.html:318
#: warehouse/templates/manage/team/history.html:122
msgid "Location info"
msgstr ""
From a7a7dd50cdd8943fea205823615b73523c402f0f Mon Sep 17 00:00:00 2001
From: William Woodruff
Date: Tue, 6 Jun 2023 16:55:45 -0400
Subject: [PATCH 5/5] tests: fix google publisher_url test
Signed-off-by: William Woodruff
---
tests/unit/oidc/models/test_google.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/unit/oidc/models/test_google.py b/tests/unit/oidc/models/test_google.py
index 739b9b903922..a8f452a7f6d0 100644
--- a/tests/unit/oidc/models/test_google.py
+++ b/tests/unit/oidc/models/test_google.py
@@ -35,7 +35,7 @@ def test_publisher_name(self):
def test_publisher_url(self):
publisher = google.GooglePublisher(email="fake@example.com")
- assert publisher.publisher_url() == "https://accounts.google.com"
+ assert publisher.publisher_url() is None
def test_stringifies_as_email(self):
publisher = google.GooglePublisher(email="fake@example.com")