Update index.py

This commit is contained in:
midoks
2023-10-30 15:40:25 +08:00
parent c925e09ea6
commit bacac94186
+12
View File
@@ -508,6 +508,18 @@ def userList():
return mw.returnJson(True, 'OK', data)
def checkRepoListIsHasScript(data):
path = getRootPath()
for x in range(len(data)):
name = data[x]['name'] + '/' + data[x]['repo'] + '.git'
path_tmp = path + '/' + name + '/custom_hooks/post-receive'
if os.path.exists(path_tmp):
data[x]['has_hook'] = True
else:
data[x]['has_hook'] = False
return data
def repoList():
conf = getConf()