Closed marschr closed 1 year ago
Hi
Thanks for your pull request.
i would like to inform you that if you run the script more than 1 times and if a repository already exists in Gitea then it will throw ---> Warning : Repository Already Exists
Could you please share your screenshot so i can check if throwing a lot of errors like that ?
this how it should look
But sometimes few more lines of the same content will be added which could look like below
This seems like a bug in the indentation. I am facing UnboundLocalError: local variable 'm' referenced before assignment
because the variable m
is not defined if the first repo is not a fork.
Hi,
I fixed an identation issue on
repositorySource.py
that was spamming the terminal with---> Warning : Repository Already Exists
because them
variable on line 38 never goes out of scope after theif
statement finishes in python.Once the pygithub API repo iterable return a false
repo.fork
on line 16 (i.e. it's asource
repo, not afork
) this given repo is assigned to them
variable and never goes out of scope, even on subsequent iterations where the if statement on line 16 returnsrepo.fork
as true (skipping the if block) leaving them
variable assigned to the last iteration value, causinggiteaCreateRepo()
to spam the warning message.So far fixing identation here fixed my bugs, currenly I'm trying to sync a few dozen of repos and keeping an eye on the resuls, I may be wrong and overseeing something, feel free to correct me and discard this PR.