Skip to content

Commit 7c9f199

Browse files
authored
Update file details template for Google Cloud attestations (#18020)
* Update file details template for Google Cloud attestations * Update translations
1 parent a6390fb commit 7c9f199

File tree

2 files changed

+36
-18
lines changed

2 files changed

+36
-18
lines changed

warehouse/locale/messages.pot

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ msgstr ""
962962
#: warehouse/templates/base.html:317 warehouse/templates/base.html:327
963963
#: warehouse/templates/base.html:340
964964
#: warehouse/templates/includes/accounts/profile-callout.html:18
965-
#: warehouse/templates/includes/file-details.html:101
965+
#: warehouse/templates/includes/file-details.html:108
966966
#: warehouse/templates/index.html:100 warehouse/templates/index.html:104
967967
#: warehouse/templates/manage/account.html:228
968968
#: warehouse/templates/manage/account.html:234
@@ -2860,51 +2860,51 @@ msgstr ""
28602860
msgid "Public profile"
28612861
msgstr ""
28622862

2863-
#: warehouse/templates/includes/file-details.html:34
2863+
#: warehouse/templates/includes/file-details.html:41
28642864
msgid "File details"
28652865
msgstr ""
28662866

2867-
#: warehouse/templates/includes/file-details.html:45
2867+
#: warehouse/templates/includes/file-details.html:52
28682868
#, python-format
28692869
msgid "Upload date: %(upload_time)s"
28702870
msgstr ""
28712871

2872-
#: warehouse/templates/includes/file-details.html:46
2872+
#: warehouse/templates/includes/file-details.html:53
28732873
#, python-format
28742874
msgid "Size: %(size)s"
28752875
msgstr ""
28762876

2877-
#: warehouse/templates/includes/file-details.html:47
2877+
#: warehouse/templates/includes/file-details.html:54
28782878
#, python-format
28792879
msgid "Tags: %(tags)s"
28802880
msgstr ""
28812881

2882-
#: warehouse/templates/includes/file-details.html:49
2882+
#: warehouse/templates/includes/file-details.html:56
28832883
#, python-format
28842884
msgid "Uploaded using Trusted Publishing? %(is_tp)s"
28852885
msgstr ""
28862886

2887-
#: warehouse/templates/includes/file-details.html:54
2887+
#: warehouse/templates/includes/file-details.html:61
28882888
#, python-format
28892889
msgid "Uploaded via: %(uploaded_via)s"
28902890
msgstr ""
28912891

2892-
#: warehouse/templates/includes/file-details.html:62
2892+
#: warehouse/templates/includes/file-details.html:69
28932893
#, python-format
28942894
msgid "Hashes for %(filename)s"
28952895
msgstr ""
28962896

2897-
#: warehouse/templates/includes/file-details.html:65
2897+
#: warehouse/templates/includes/file-details.html:72
28982898
msgid "Algorithm"
28992899
msgstr ""
29002900

2901-
#: warehouse/templates/includes/file-details.html:66
2901+
#: warehouse/templates/includes/file-details.html:73
29022902
msgid "Hash digest"
29032903
msgstr ""
29042904

2905-
#: warehouse/templates/includes/file-details.html:75
2906-
#: warehouse/templates/includes/file-details.html:84
2907-
#: warehouse/templates/includes/file-details.html:93
2905+
#: warehouse/templates/includes/file-details.html:82
2906+
#: warehouse/templates/includes/file-details.html:91
2907+
#: warehouse/templates/includes/file-details.html:100
29082908
#: warehouse/templates/manage/account.html:206
29092909
#: warehouse/templates/manage/account/recovery_codes-provision.html:58
29102910
#: warehouse/templates/manage/account/totp-provision.html:57
@@ -2914,9 +2914,9 @@ msgstr ""
29142914
msgid "Copy to clipboard"
29152915
msgstr ""
29162916

2917-
#: warehouse/templates/includes/file-details.html:76
2918-
#: warehouse/templates/includes/file-details.html:85
2919-
#: warehouse/templates/includes/file-details.html:94
2917+
#: warehouse/templates/includes/file-details.html:83
2918+
#: warehouse/templates/includes/file-details.html:92
2919+
#: warehouse/templates/includes/file-details.html:101
29202920
#: warehouse/templates/manage/account.html:207
29212921
#: warehouse/templates/manage/account/recovery_codes-provision.html:59
29222922
#: warehouse/templates/manage/account/totp-provision.html:58
@@ -2925,7 +2925,7 @@ msgstr ""
29252925
msgid "Copy"
29262926
msgstr ""
29272927

2928-
#: warehouse/templates/includes/file-details.html:101
2928+
#: warehouse/templates/includes/file-details.html:108
29292929
#, python-format
29302930
msgid ""
29312931
"<a href=\"%(href)s\" title=\"%(title)s\" target=\"_blank\" "

warehouse/templates/includes/file-details.html

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727
<code>{{ publ.workflow_filepath }}</code> on {{ publ.repository }}
2828
</a>
2929
</p>
30+
{% elif publ.kind == "Google" %}
31+
<p>
32+
Publisher: <span>
33+
<i class="fa-brands fa-google" aria-hidden="true"></i>
34+
<code>{{ publ.email }}</code>
35+
</span>
36+
</p>
3037
{% endif %}
3138
{%- endmacro %}
3239

@@ -136,6 +143,7 @@ <h3>Provenance</h3>
136143
<li>Sigstore transparency entry: <a href="https://search.sigstore.dev/?logIndex={{ viewer.transparency_entry.logIndex }}">{{ viewer.transparency_entry.logIndex }}</a> </li>
137144
<li>Sigstore integration time: {{ humanize(viewer.transparency_entry.integratedTime | int | ctime, time="true") }} </li>
138145
</ul>
146+
{% if bundle.publisher.repository %}
139147
Source repository:
140148
<ul>
141149
<li>Permalink: <a href="{{ viewer.permalink_with_digest }}">
@@ -147,16 +155,26 @@ <h3>Provenance</h3>
147155
<li>Owner: <a href="{{ viewer.owner }}">{{ viewer.owner }}</a></li>
148156
<li>Access: <code>{{ viewer.access }}</code></li>
149157
</ul>
158+
{% endif %}
150159
Publication detail:
151160
<ul>
152161
<li>Token Issuer: <code>{{ viewer.issuer }}</code></li>
162+
{% if viewer.publisher.kind == "Google" %}
163+
<li>Service Account: <code>{{ viewer.publisher.email }}</code></li>
164+
{% endif %}
165+
{% if viewer.environment %}
153166
<li>Runner Environment: <code>{{ viewer.environment }}</code></li>
167+
{% endif %}
168+
{% if viewer.workflow_filename and viewer.build_digest %}
154169
<li>Publication workflow:
155170
<a href="{{ viewer.workflow_url }}">
156171
<code>{{ viewer.workflow_filename }}@{{ viewer.build_digest }}</code>
157172
</a>
158173
</li>
174+
{% endif %}
175+
{% if viewer.trigger %}
159176
<li>Trigger Event: <code>{{ viewer.trigger }}</code></li>
177+
{% endif %}
160178
</ul>
161179
</li>
162180
{% endfor %}
@@ -165,4 +183,4 @@ <h3>Provenance</h3>
165183
</div>
166184
{% endfor %}
167185
{% endif %}
168-
</div>
186+
</div>

0 commit comments

Comments
 (0)