1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-11-24 13:58:53 +01:00

Make gitea_api.RepoExists exception more helpful by giving a hint to fork under a different name.

This commit is contained in:
2025-11-03 11:51:46 +01:00
parent de71095aa6
commit 9b7c3889d4

View File

@@ -154,7 +154,11 @@ class RepoExists(GiteaException):
self.repo = repo
def __str__(self):
result = f"Repo '{self.owner}/{self.repo}' already exists"
result = (
f"Repo '{self.owner}/{self.repo}' already exists.\n"
" - If you were forking a repo, you may consider forking with an alternative repo name.\n"
" - You may also want to delete the repo and fork it from elsewhere."
)
return result