diff --git a/plugins/gogs/index.html b/plugins/gogs/index.html index 86eed2374..ff4a879a0 100755 --- a/plugins/gogs/index.html +++ b/plugins/gogs/index.html @@ -4,7 +4,7 @@
服务
自启动
-手动编辑
+手动编辑
配置文件
配置修改
用户列表
diff --git a/plugins/gogs/index.py b/plugins/gogs/index.py index bd5e8f112..6185c6d7a 100755 --- a/plugins/gogs/index.py +++ b/plugins/gogs/index.py @@ -748,7 +748,7 @@ def projectScriptRun(): return mw.returnJson(True, '脚本文件执行成功,观察日志!') -def gogsEdit(): +def gogsEditTpl(): data = {} data['post_receive'] = getPluginDir() + '/hook/post-receive.tpl' data['commit'] = getPluginDir() + '/hook/commit.tpl' @@ -812,6 +812,8 @@ if __name__ == "__main__": print(getGogsConf()) elif func == 'submit_gogs_conf': print(submitGogsConf()) + elif func == 'gogs_edit_tpl': + print(gogsEditTpl()) elif func == 'user_list': print(userList()) elif func == 'repo_list': @@ -828,8 +830,8 @@ if __name__ == "__main__": print(projectScriptDebug()) elif func == 'project_script_run': print(projectScriptRun()) - elif func == 'gogs_edit': - print(gogsEdit()) + elif func == 'project_script_self': + print(projectScriptSelf()) elif func == 'get_rsa_public': print(getRsaPublic()) elif func == 'get_total_statistics': diff --git a/plugins/gogs/js/gogs.js b/plugins/gogs/js/gogs.js index 7a80525e3..89d0d0efa 100755 --- a/plugins/gogs/js/gogs.js +++ b/plugins/gogs/js/gogs.js @@ -102,9 +102,8 @@ function submitGogsConf() { }); } -function gogsEdit(){ - - gogsPost('gogs_edit',{} , function(data){ +function gogsEditTpl(){ + gogsPost('gogs_edit_tpl',{} , function(data){ // console.log(data); var rdata = $.parseJSON(data.data); var edit = '通用的手动编辑:
';