Skip to content

Commit c947bd9

Browse files
Fix exercise T4L2/tags-push (#201)
# Exercise Review ## Exercise Discussion #194 (comment) ## Checklist - [ ] If you require a new remote repository on the `Git-Mastery` organization, have you [created a request](https://github.com/git-mastery/exercises/issues/new?template=request_exercise_repository.md) for it? - [x] Have you written unit tests using [`repo-smith`](https://github.com/git-mastery/repo-smith) to validate the exercise grading scheme? - [x] Have you tested the download script using `test-download.sh`? - [x] Have you verified that this exercise does not already exist or is not currently in review? - [ ] Did you introduce a new grading mechanism that should belong to [`git-autograder`](https://github.com/git-mastery/git-autograder)? - [ ] Did you introduce a new dependency that should belong to [`app`](https://github.com/git-mastery/app)?
1 parent 477b005 commit c947bd9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tags_push/verify.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def get_username() -> Optional[str]:
3737
return run_command(["gh", "api", "user", "-q", ".login"])
3838

3939

40-
def get_remote_tags(username: str) -> List[str]:
41-
raw_tags = run_command(["git", "ls-remote", "--tags"])
40+
def get_remote_tags(username: str, exercise: GitAutograderExercise) -> List[str]:
41+
raw_tags = exercise.repo.repo.git.ls_remote("--tags")
4242
if raw_tags is None:
4343
return []
4444
return [line.split("/")[2] for line in raw_tags.strip().splitlines()]
@@ -49,7 +49,7 @@ def verify(exercise: GitAutograderExercise) -> GitAutograderOutput:
4949
if username is None:
5050
raise exercise.wrong_answer([IMPROPER_GH_CLI_SETUP])
5151

52-
tag_names = get_remote_tags(username)
52+
tag_names = get_remote_tags(username, exercise)
5353

5454
comments = []
5555

0 commit comments

Comments
 (0)