You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/08/08 22:16:36 UTC

[GitHub] [tvm] driazati commented on a diff in pull request #12310: [ci][tvmbot] Fix authorization filtering

driazati commented on code in PR #12310:
URL: https://github.com/apache/tvm/pull/12310#discussion_r940709883


##########
tests/scripts/github_tvmbot.py:
##########
@@ -566,30 +583,35 @@ def check_author(pr, triggering_comment, args):
     return False
 
 
-def check_collaborator(pr, triggering_comment, args):
-    logging.info("Checking collaborators")
-    # Get the list of collaborators for the repo filtered by the comment
-    # author
+def search_users(name, triggering_comment, testing_json, search_fn):
+    logging.info(f"Checking {name}")
     commment_author = triggering_comment["user"]["login"]
-    if args.testing_collaborators_json:
-        collaborators = json.loads(args.testing_collaborators_json)
+    if testing_json:
+        matching_users = json.loads(testing_json)
     else:
-        collaborators = pr.search_collaborator(commment_author)
-    logging.info(f"Found collaborators: {collaborators}")
+        matching_users = search_fn(commment_author)

Review Comment:
   the pattern of checking the testing json vs using the actual search is the same between both which is why I merged them so nothing slips by and makes a network request in the tests or something



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org