Changeset View
Changeset View
Standalone View
Standalone View
swh/web/browse/snapshot_context.py
Show First 20 Lines • Show All 1,214 Lines • ▼ Show 20 Lines | snapshot = archive.lookup_snapshot( | ||||
target_types=["release", "alias"], | target_types=["release", "alias"], | ||||
branch_name_include_substring=release_name_include, | branch_name_include_substring=release_name_include, | ||||
) | ) | ||||
displayed_releases = [] | displayed_releases = [] | ||||
if snapshot: | if snapshot: | ||||
_, displayed_releases, _ = process_snapshot_branches(snapshot) | _, displayed_releases, _ = process_snapshot_branches(snapshot) | ||||
for release in displayed_releases: | for release in displayed_releases: | ||||
query_params_tgt = {"snapshot": snapshot_id} | query_params_tgt = {"snapshot": snapshot_id, "release": release["name"]} | ||||
if origin_info: | if origin_info: | ||||
query_params_tgt["origin_url"] = origin_info["url"] | query_params_tgt["origin_url"] = origin_info["url"] | ||||
release_url = reverse( | release_url = reverse( | ||||
"browse-release", | "browse-release", | ||||
url_args={"sha1_git": release["id"]}, | url_args={"sha1_git": release["id"]}, | ||||
query_params=query_params_tgt, | query_params=query_params_tgt, | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |