We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d97ccf commit 0e65483Copy full SHA for 0e65483
1 file changed
app/commands/download.py
@@ -24,6 +24,7 @@
24
from app.utils.git import add_all, commit, empty_commit, init
25
from app.utils.github_cli import (
26
clone_with_custom_name,
27
+ close_pr,
28
delete_repo,
29
fork,
30
get_username,
@@ -49,6 +50,11 @@ def _download_exercise(
49
50
51
if os.path.isdir(exercise):
52
warn(f"You already have {exercise}, removing it to download again")
53
+ old_config = ExerciseConfig.read(Path(exercise), 0)
54
+ if old_config.exercise_repo.repo_type == "remote" and old_config.exercise_repo.create_fork:
55
+ pr_repo_full_name = old_config.exercise_repo.pr_repo_full_name
56
+ if pr_repo_full_name:
57
+ close_pr(pr_repo_full_name)
58
rmtree(exercise)
59
60
os.makedirs(exercise)
0 commit comments