mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-10-19 22:27:20 +02:00
fix look for default file
This commit is contained in:
1 parent
449e19f9b6
commit
a176998c5a
1 file changed
+7
-6
@@ -299,15 +299,16 @@ class Anonymous_Github:
|
||||
return path[:4] == "docs"
|
||||
|
||||
def is_default_file(f):
|
||||
try:
|
||||
f.name.lower().index("readme")
|
||||
return True
|
||||
except ValueError:
|
||||
default_name = ["readme", "index"]
|
||||
for name in default_name:
|
||||
try:
|
||||
f.name.lower().index("index")
|
||||
if type(f) is github.ContentFile.ContentFile:
|
||||
f.name.lower().index(name)
|
||||
elif type(f) is github.GitTreeElement.GitTreeElement:
|
||||
f.path.lower().index(name)
|
||||
return True
|
||||
except ValueError:
|
||||
pass
|
||||
continue
|
||||
return False
|
||||
|
||||
def get_current_folder_files(path, current_file, repository_config, g_repo, g_commit):
|
||||
|
||||
Reference in new issue
Block a user