pull/282/head
midoks 2 years ago
parent 5ea062862f
commit 0962e5aab8
  1. 3
      plugins/gitea/index.py
  2. 5
      plugins/gitea/js/gitea.js

@ -601,11 +601,13 @@ def projectScriptLoad():
if not os.path.exists(path + '/custom_hooks'): if not os.path.exists(path + '/custom_hooks'):
mw.execShell('mkdir -p ' + path + '/custom_hooks') mw.execShell('mkdir -p ' + path + '/custom_hooks')
mw.execShell('chown -R www:www ' + path + '/custom_hooks')
pct_content = mw.readFile(post_receive_tpl) pct_content = mw.readFile(post_receive_tpl)
pct_content = pct_content.replace('{$PATH}', path + '/custom_hooks') pct_content = pct_content.replace('{$PATH}', path + '/custom_hooks')
mw.writeFile(post_receive, pct_content) mw.writeFile(post_receive, pct_content)
mw.execShell('chmod 777 ' + post_receive) mw.execShell('chmod 777 ' + post_receive)
mw.execShell('chown -R www:www ' + post_receive)
commit_tpl = getPluginDir() + '/hook/commit.tpl' commit_tpl = getPluginDir() + '/hook/commit.tpl'
commit = path + '/custom_hooks/commit' commit = path + '/custom_hooks/commit'
@ -622,6 +624,7 @@ def projectScriptLoad():
cc_content = cc_content.replace('{$WEB_ROOT}', mw.getWwwDir()) cc_content = cc_content.replace('{$WEB_ROOT}', mw.getWwwDir())
mw.writeFile(commit, cc_content) mw.writeFile(commit, cc_content)
mw.execShell('chmod 777 ' + commit) mw.execShell('chmod 777 ' + commit)
mw.execShell('chown -R www:www ' + commit)
return 'ok' return 'ok'

@ -276,10 +276,9 @@ function projectScriptLoad(user,name){
return; return;
} }
layer.msg('加载成功!',{icon:1,time:2000,shade: [0.3, '#000']}); showMsg('加载成功!',function(){
setTimeout(function(){
userProjectList(1); userProjectList(1);
}, 2000); },{icon:1,time:2000,shade: [0.3, '#000']},2000);
}); });
} }

Loading…
Cancel
Save