varunsridharan / github-gitea-mirror

Simple Python Script To Mirror Repository From Github To Gitea
MIT License
177 stars 20 forks source link

Add a blacklist for repositories #5

Closed mrksr closed 2 years ago

mrksr commented 2 years ago

Follow-up from #3. As requested, I added a quick check that (a) the blacklist is defined and (b) that single strings are wrapped in a list so they work as well.

Is that what you had in mind, @varunsridharan? :)

varunsridharan commented 2 years ago

Well I was thinking of having a check which checks if blacklist variable is defined and if so the. If it's a. String then it should convert to array if not the black list function should not run

mrksr commented 2 years ago

That's what the code should be doing I hope, shouldn't it? If the blacklist is not in config, the default (an empty list) is returned, so no blacklisting is performed. If it is defined, the special case of a string is checked and it's lifted to a list, which would mean that a single string represents a single glob for the blacklist.