Spaces:
Sleeping
Sleeping
final fix or my final fix
Browse files
src/gradio_space_ci/webhook.py
CHANGED
@@ -299,7 +299,7 @@ async def trigger_ci_on_pr(payload: WebhookPayload, task_queue: BackgroundTasks)
|
|
299 |
for discussion in get_repo_discussions(repo_id=space_id, repo_type="space"):
|
300 |
if discussion.is_pull_request and discussion.status == "open":
|
301 |
# Was the pr updated by an untrusted author ?
|
302 |
-
details = get_discussion_details(repo_id=space_id, repo_type="space", discussion_num=
|
303 |
event_author = details.events[-1]._event["author"]["name"] # username of that event
|
304 |
if event_author not in EPHEMERAL_SPACES_CONFIG["trusted_authors"]:
|
305 |
# Untrusted author, we unset the config as part or security reasons
|
|
|
299 |
for discussion in get_repo_discussions(repo_id=space_id, repo_type="space"):
|
300 |
if discussion.is_pull_request and discussion.status == "open":
|
301 |
# Was the pr updated by an untrusted author ?
|
302 |
+
details = get_discussion_details(repo_id=space_id, repo_type="space", discussion_num=discussion.num)
|
303 |
event_author = details.events[-1]._event["author"]["name"] # username of that event
|
304 |
if event_author not in EPHEMERAL_SPACES_CONFIG["trusted_authors"]:
|
305 |
# Untrusted author, we unset the config as part or security reasons
|