not-lain commited on
Commit
86ebee4
·
1 Parent(s): c051b06

final fix or my final fix

Browse files
Files changed (1) hide show
  1. src/gradio_space_ci/webhook.py +1 -1
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=pr_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