Spaces:
Sleeping
Sleeping
hot fix for card data
Browse files
src/gradio_space_ci/webhook.py
CHANGED
@@ -334,7 +334,9 @@ def sync_ci_space(space_id: str, pr_num: int) -> None:
|
|
334 |
is_configured = configure_ephemeral_space(space_id=space_id, pr_num=pr_num)
|
335 |
|
336 |
# Download space codebase from PR revision
|
337 |
-
snapshot_path = Path(
|
|
|
|
|
338 |
|
339 |
# Overwrite README file in cache (/!\)
|
340 |
readme_path = snapshot_path / "README.md"
|
@@ -392,6 +394,7 @@ def create_ephemeral_space(space_id: str, pr_num: int) -> bool:
|
|
392 |
# => we configure the ephemeral space
|
393 |
##
|
394 |
|
|
|
395 |
def configure_ephemeral_space(space_id: str, pr_num: int, trusted_pr=False) -> bool:
|
396 |
# Config values
|
397 |
ci_space_id = _get_ci_space_id(space_id=space_id, pr_num=pr_num)
|
|
|
334 |
is_configured = configure_ephemeral_space(space_id=space_id, pr_num=pr_num)
|
335 |
|
336 |
# Download space codebase from PR revision
|
337 |
+
snapshot_path = Path(
|
338 |
+
snapshot_download(repo_id=space_id, revision=f"refs/pr/{pr_num}", repo_type="space", force_download=True)
|
339 |
+
)
|
340 |
|
341 |
# Overwrite README file in cache (/!\)
|
342 |
readme_path = snapshot_path / "README.md"
|
|
|
394 |
# => we configure the ephemeral space
|
395 |
##
|
396 |
|
397 |
+
|
398 |
def configure_ephemeral_space(space_id: str, pr_num: int, trusted_pr=False) -> bool:
|
399 |
# Config values
|
400 |
ci_space_id = _get_ci_space_id(space_id=space_id, pr_num=pr_num)
|