config.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <?php
  2. global $lang, $app;
  3. $app->loadLang('repo');
  4. $config->repo->notSetMenuVars = array('maintain', 'create', 'createrepo', 'edit', 'import');
  5. $config->program = new stdclass();
  6. $config->program->suffix['c'] = "cpp";
  7. $config->program->suffix['cpp'] = "cpp";
  8. $config->program->suffix['asp'] = "asp";
  9. $config->program->suffix['php'] = "php";
  10. $config->program->suffix['cs'] = "cs";
  11. $config->program->suffix['sh'] = "bash";
  12. $config->program->suffix['jsp'] = "java";
  13. $config->program->suffix['lua'] = "lua";
  14. $config->program->suffix['sql'] = "sql";
  15. $config->program->suffix['js'] = "javascript";
  16. $config->program->suffix['ini'] = "ini";
  17. $config->program->suffix['conf'] = "apache";
  18. $config->program->suffix['bat'] = "dos";
  19. $config->program->suffix['py'] = "python";
  20. $config->program->suffix['rb'] = "ruby";
  21. $config->program->suffix['as'] = "actionscript";
  22. $config->program->suffix['html'] = "xml";
  23. $config->program->suffix['xml'] = "xml";
  24. $config->program->suffix['htm'] = "xml";
  25. $config->program->suffix['pl'] = "perl";
  26. $config->repo->cacheTime = 10;
  27. $config->repo->syncTime = 10;
  28. $config->repo->batchNum = 100;
  29. $config->repo->svnBatchNum = 10;
  30. $config->repo->images = '|png|gif|jpg|ico|jpeg|bmp|';
  31. $config->repo->binary = '|pdf|';
  32. $config->repo->synced = '';
  33. $config->repo->notSyncSCM = array('Gitlab');
  34. $config->repo->repoSyncLog = new stdclass();
  35. $config->repo->repoSyncLog->one = '1';
  36. $config->repo->repoSyncLog->done = array('done', '完成', 'git/attributes');
  37. $config->repo->repoSyncLog->total = array('Total', '总数');
  38. $config->repo->repoSyncLog->fatal = array('fatal', '致命');
  39. $config->repo->repoSyncLog->error = array('error', '错误');
  40. $config->repo->repoSyncLog->failed = array('failed', '失败');
  41. $config->repo->repoSyncLog->finish = 'finish';
  42. $config->repo->repoSyncLog->emptyRepo = array('empty repository', '空仓库');
  43. $config->repo->repoSyncLog->finishCount = array('Counting objects: 100%');
  44. $config->repo->repoSyncLog->logFilePrefix = '/log/clone.progress.';
  45. $config->repo->repoSyncLog->finishCompress = array('Compressing objects: 100%');
  46. $config->repo->editor = new stdclass();
  47. $config->repo->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
  48. $config->repo->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
  49. $config->repo->editor->view = array('id' => 'commentText', 'tools' => 'simpleTools');
  50. $config->repo->editor->diff = array('id' => 'commentText', 'tools' => 'simpleTools');
  51. $config->repo->switcherModuleList = array('repo', 'job', 'compile', 'mr');
  52. $config->repo->switcherMethodList = array('browse', 'review', 'view', 'diff', 'log', 'revision', 'blame');
  53. $config->repo->create = new stdclass();
  54. $config->repo->create->requiredFields = 'product,SCM,name,encoding';
  55. $config->repo->createRepo = new stdclass();
  56. $config->repo->createRepo->requiredFields = 'product,name';
  57. $config->repo->edit = new stdclass();
  58. $config->repo->edit->requiredFields = 'product,SCM,name,encoding';
  59. $config->repo->svn = new stdclass();
  60. $config->repo->svn->requiredFields = 'account,password';
  61. $config->repo->gitlab = new stdclass;
  62. $config->repo->gitlab->perPage = 300;
  63. $config->repo->gitlab->apiPath = "%s/api/v4/projects/%s/repository/";
  64. $config->repo->gitea = new stdclass;
  65. $config->repo->gitea->apiPath = "%s/api/v1/repos/%s/";
  66. $config->repo->gitServiceList = array('gitlab', 'gitea', 'gogs');
  67. $config->repo->gitServiceTypeList = array('Gitlab', 'Gitea', 'Gogs');
  68. $config->repo->gitTypeList = array('Gitlab', 'Gitea', 'Gogs', 'Git');
  69. $config->repo->rules['module']['task'] = 'Task';
  70. $config->repo->rules['module']['bug'] = 'Bug';
  71. $config->repo->rules['module']['story'] = 'Story';
  72. $config->repo->rules['task']['start'] = 'Start';
  73. $config->repo->rules['task']['finish'] = 'Finish';
  74. $config->repo->rules['task']['logEfforts'] = 'Effort';
  75. $config->repo->rules['task']['consumed'] = 'Cost';
  76. $config->repo->rules['task']['left'] = 'Left';
  77. $config->repo->rules['bug']['resolve'] = 'Fix';
  78. $config->repo->rules['id']['mark'] = '#';
  79. $config->repo->rules['id']['split'] = ',';
  80. $config->repo->rules['mark']['consumed'] = ':';
  81. $config->repo->rules['mark']['left'] = ':';
  82. $config->repo->rules['unit']['consumed'] = 'h';
  83. $config->repo->rules['unit']['left'] = 'h';
  84. $config->repo->fileExt["abap"] = array('.abap');
  85. $config->repo->fileExt["apex"] = array('.cls');
  86. $config->repo->fileExt["azcli"] = array('.azcli');
  87. $config->repo->fileExt["bat"] = array('.bat', '.cmd');
  88. $config->repo->fileExt["c"] = array('.c', '.h');
  89. $config->repo->fileExt["cameligo"] = array('.mligo');
  90. $config->repo->fileExt["clojure"] = array('.clj', '.cljs', '.cljc', '.edn');
  91. $config->repo->fileExt["coffeescript"] = array('.coffee');
  92. $config->repo->fileExt["cpp"] = array('.cpp', '.cc', '.cxx', '.hpp', '.hh', '.hxx');
  93. $config->repo->fileExt["csharp"] = array('.cs', '.csx', '.cake');
  94. $config->repo->fileExt["css"] = array('.css');
  95. $config->repo->fileExt["dart"] = array('.dart');
  96. $config->repo->fileExt["dockerfile"] = array('.dockerfile');
  97. $config->repo->fileExt["ecl"] = array('.ecl');
  98. $config->repo->fileExt["fsharp"] = array('.fs', '.fsi', '.ml', '.mli', '.fsx', '.fsscript');
  99. $config->repo->fileExt["go"] = array('.go');
  100. $config->repo->fileExt["graphql"] = array('.graphql', '.gql');
  101. $config->repo->fileExt["handlebars"] = array('.handlebars', '.hbs');
  102. $config->repo->fileExt["hcl"] = array('.tf', '.tfvars', '.hcl');
  103. $config->repo->fileExt["html"] = array('.html', '.htm', '.shtml', '.xhtml', '.mdoc', '.jsp', '.asp', '.aspx', '.jshtm');
  104. $config->repo->fileExt["ini"] = array('.ini', '.properties', '.gitconfig');
  105. $config->repo->fileExt["java"] = array('.java', '.jav');
  106. $config->repo->fileExt["javascript"] = array('.js', '.es6', '.jsx', '.mjs');
  107. $config->repo->fileExt["julia"] = array('.jl');
  108. $config->repo->fileExt["kotlin"] = array('.kt');
  109. $config->repo->fileExt["less"] = array('.less');
  110. $config->repo->fileExt["lexon"] = array('.lex');
  111. $config->repo->fileExt["lua"] = array('.lua');
  112. $config->repo->fileExt["m3"] = array('.m3', '.i3', '.mg', '.ig');
  113. $config->repo->fileExt["markdown"] = array('.md', '.markdown', '.mdown', '.mkdn', '.mkd', '.mdwn', '.mdtxt', '.mdtext');
  114. $config->repo->fileExt["mips"] = array('.s');
  115. $config->repo->fileExt["msdax"] = array('.dax', '.msdax');
  116. $config->repo->fileExt["objective-c"] = array('.m');
  117. $config->repo->fileExt["pascal"] = array('.pas', '.p', '.pp');
  118. $config->repo->fileExt["pascaligo"] = array('.ligo');
  119. $config->repo->fileExt["perl"] = array('.pl');
  120. $config->repo->fileExt["php"] = array('.php', '.php4', '.php5', '.phtml', '.ctp');
  121. $config->repo->fileExt["postiats"] = array('.dats', '.sats', '.hats');
  122. $config->repo->fileExt["powerquery"] = array('.pq', '.pqm');
  123. $config->repo->fileExt["powershell"] = array('.ps1', '.psm1', '.psd1');
  124. $config->repo->fileExt["pug"] = array('.jade', '.pug');
  125. $config->repo->fileExt["python"] = array('.py', '.rpy', '.pyw', '.cpy', '.gyp', '.gypi');
  126. $config->repo->fileExt["r"] = array('.r', '.rhistory', '.rmd', '.rprofile', '.rt');
  127. $config->repo->fileExt["razor"] = array('.cshtml');
  128. $config->repo->fileExt["redis"] = array('.redis');
  129. $config->repo->fileExt["restructuredtext"] = array('.rst');
  130. $config->repo->fileExt["ruby"] = array('.rb', '.rbx', '.rjs', '.gemspec', '.pp');
  131. $config->repo->fileExt["rust"] = array('.rs', '.rlib');
  132. $config->repo->fileExt["sb"] = array('.sb');
  133. $config->repo->fileExt["scala"] = array('.scala', '.sc', '.sbt');
  134. $config->repo->fileExt["scheme"] = array('.scm', '.ss', '.sch', '.rkt');
  135. $config->repo->fileExt["scss"] = array('.scss');
  136. $config->repo->fileExt["shell"] = array('.sh', '.bash');
  137. $config->repo->fileExt["sophia"] = array('.aes');
  138. $config->repo->fileExt["sol"] = array('.sol');
  139. $config->repo->fileExt["sql"] = array('.sql');
  140. $config->repo->fileExt["st"] = array('.st', '.iecst', '.iecplc', '.lc3lib');
  141. $config->repo->fileExt["swift"] = array('.swift');
  142. $config->repo->fileExt["systemverilog"] = array('.sv', '.svh');
  143. $config->repo->fileExt["tcl"] = array('.tcl');
  144. $config->repo->fileExt["twig"] = array('.twig');
  145. $config->repo->fileExt["typescript"] = array('.ts', '.tsx');
  146. $config->repo->fileExt["vb"] = array('.vb');
  147. $config->repo->fileExt["verilog"] = array('.v', '.vh');
  148. $config->repo->fileExt["xml"] = array('.xml', '.dtd', '.ascx', '.csproj', '.config', '.wxi', '.wxl', '.wxs', '.xaml', '.svg', '.svgz', '.opf', '.xsl');
  149. $config->repo->fileExt["yaml"] = array('.yaml', '.yml');
  150. $config->repo->search['module'] = 'repo';
  151. $config->repo->search['fields']['name'] = $lang->repo->name;
  152. $config->repo->search['fields']['product'] = $lang->repo->product;
  153. $config->repo->search['fields']['SCM'] = $lang->repo->SCM;
  154. $config->repo->search['params']['name'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
  155. $config->repo->search['params']['product'] = array('operator' => 'include', 'control' => 'select', 'values' => '');
  156. $config->repo->search['params']['SCM'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->repo->scmList);
  157. $config->repo->searchCommits['module'] = 'repoCommits';
  158. $config->repo->searchCommits['fields']['commit'] = $lang->repo->revisionA;
  159. $config->repo->searchCommits['fields']['date'] = $lang->repo->time;
  160. $config->repo->searchCommits['fields']['committer'] = $lang->repo->committer;
  161. $config->repo->searchCommits['params']['commit'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
  162. $config->repo->searchCommits['params']['date'] = array('operator' => '=', 'control' => 'date', 'values' => '');
  163. $config->repo->searchCommits['params']['committer'] = array('operator' => 'include', 'control' => 'input', 'values' => '');