diff --git a/tags_push/verify.py b/tags_push/verify.py index 90eef87..3e324b4 100644 --- a/tags_push/verify.py +++ b/tags_push/verify.py @@ -37,8 +37,8 @@ def get_username() -> Optional[str]: return run_command(["gh", "api", "user", "-q", ".login"]) -def get_remote_tags(username: str) -> List[str]: - raw_tags = run_command(["git", "ls-remote", "--tags"]) +def get_remote_tags(username: str, exercise: GitAutograderExercise) -> List[str]: + raw_tags = exercise.repo.repo.git.ls_remote("--tags") if raw_tags is None: return [] return [line.split("/")[2] for line in raw_tags.strip().splitlines()] @@ -49,7 +49,7 @@ def verify(exercise: GitAutograderExercise) -> GitAutograderOutput: if username is None: raise exercise.wrong_answer([IMPROPER_GH_CLI_SETUP]) - tag_names = get_remote_tags(username) + tag_names = get_remote_tags(username, exercise) comments = []