Compare commits

...

1648 Commits

Author SHA1 Message Date
xxq250 cb34089982 Merge pull request '20250615版本' (#348) from Trustie/forgeplus:trustie_server into master 2025-06-15 11:47:51 +08:00
yystopf 4eb7d275a0 Merge branch 'pre_trustie_server' into trustie_server 2025-06-06 16:26:07 +08:00
yystopf 89dd43e079 Merge branch 'standalone_develop' into pre_trustie_server 2025-06-06 16:24:48 +08:00
xxq250 6ffac40f8d fixed 项目排行导出增加3列,时间处理 2025-06-06 10:23:45 +08:00
xxq250 0364b2b47c fixed 项目排行导出增加3列,时间处理 2025-06-06 10:23:25 +08:00
xxq250 a3e94e47e7 fixed 项目排行导出增加3列,时间 2025-06-06 10:18:37 +08:00
xxq250 0be92d5288 fixed 项目排行导出增加3列,时间 2025-06-06 10:18:07 +08:00
xxq250 8665d989c1 fixed 项目排行导出增加3列 2025-06-05 20:20:31 +08:00
xxq250 5df4f2d0b1 fixed 项目排行导出增加3列 2025-06-05 20:20:03 +08:00
KingChan 5d5b927fb8 Merge pull request 'update' (#359) from KingChan/forgeplus:standalone_develop into standalone_develop 2025-06-05 17:26:23 +08:00
呱呱呱 b6401930e9 sonar 2025-06-05 17:24:12 +08:00
KingChan d1ccee4e7c Merge pull request 'analyze_doxygen' (#357) from KingChan/forgeplus:standalone_develop into standalone_develop 2025-06-05 10:01:50 +08:00
呱呱呱 d80d151460 add analyze_doxygen 2025-06-05 10:01:14 +08:00
xxq250 a45953d350 fixed 流水线保存参数错误 2025-06-04 15:36:40 +08:00
KingChan 78d4d0f1ea Merge pull request 'fix sonar bug' (#355) from KingChan/forgeplus:standalone_develop into standalone_develop 2025-06-04 09:26:49 +08:00
呱呱呱 843d109b36 fix sonar bug 2025-06-04 09:26:28 +08:00
KingChan 5693c74171 Merge pull request '调整sonar文件生成' (#353) from KingChan/forgeplus:standalone_develop into standalone_develop 2025-06-04 09:19:08 +08:00
呱呱呱 1acac5d39a change sonar content 2025-06-04 09:18:26 +08:00
xxq250 fa2448b94d fixed dataset仅本地版开放 2025-05-30 11:55:27 +08:00
yystopf 4861de5670 更改:menu_list dataset默认创建 2025-05-30 11:46:17 +08:00
yystopf 257f295f2c Merge branch 'hh_portrait' into standalone_develop 2025-05-30 11:45:00 +08:00
KingChan 5ef309519c Merge pull request 'fix' (#351) from KingChan/forgeplus:standalone_develop into standalone_develop 2025-05-30 10:33:56 +08:00
kingchan 46d41a67a7 fix bug 2025-05-30 10:33:24 +08:00
xxq250 fadb729647 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2025-05-30 09:32:37 +08:00
xxq250 07f7394172 fixed 分支操作时项目时间更新 2025-05-30 09:32:31 +08:00
yystopf 97c3222926 修复 2025-05-29 20:26:38 +08:00
yystopf eb1b917d98 更改:团队影响度团队人数 2025-05-29 20:22:47 +08:00
KingChan 609373a978 Merge pull request 'doxygen url' (#349) from KingChan/forgeplus:standalone_develop into standalone_develop 2025-05-29 19:12:04 +08:00
呱呱呱 a46bec5f0c doxygen url 2025-05-29 19:11:43 +08:00
KingChan 6706840a56 Merge pull request 'doxygen' (#347) from KingChan/forgeplus:standalone_develop into standalone_develop 2025-05-29 17:34:31 +08:00
呱呱呱 0fa7ce4127 add doxygen 2025-05-29 17:33:38 +08:00
KingChan e581509e06 Merge pull request '调整' (#345) from KingChan/forgeplus:standalone_develop into standalone_develop 2025-05-29 17:10:07 +08:00
呱呱呱 3c81b924cd update sonar 2025-05-29 17:09:32 +08:00
KingChan facb8d7ded Merge pull request '合并' (#343) from KingChan/forgeplus:standalone_develop into standalone_develop 2025-05-29 16:41:54 +08:00
呱呱呱 802e8bb0aa update sonar 2025-05-29 16:41:30 +08:00
KingChan bf89ed5297 Merge pull request 'update sonar' (#341) from KingChan/forgeplus:standalone_develop into standalone_develop 2025-05-29 16:32:09 +08:00
呱呱呱 9fbf5920df update sonar 2025-05-29 16:31:07 +08:00
yystopf 7067c7d190 修复:项目健康度代码维度分母变小 2025-05-29 10:20:45 +08:00
yystopf 12370367f7 修复:移除20 2025-05-28 15:33:40 +08:00
yystopf c57482042d 修复:筛选时间不在范围内 2025-05-27 16:57:36 +08:00
yystopf eee63a7c2a 更改:返回数据更改 2025-05-27 16:35:51 +08:00
yystopf a3f3d3ec18 新增:提交总数不计入项目组周报 2025-05-27 16:16:51 +08:00
yystopf a9668c9651 新增:项目画像数据接口完成 2025-05-27 15:46:12 +08:00
yystopf 3038f3bfb9 更改:展示issue仅包括我负责的 2025-05-27 14:45:00 +08:00
yystopf bff009d673 修复:无法通过企业标识筛选周报 2025-05-27 11:35:39 +08:00
yystopf a5cf0ce14e 修复:issue_type为nil 2025-05-27 11:22:56 +08:00
yystopf a3e156005f 新增:页面json返回 2025-05-26 17:07:44 +08:00
yystopf fcedae86cb 新增:personal_issues 2025-05-26 17:05:13 +08:00
yystopf 63ff4306d4 修复:创建父周报时合并issue_type 2025-05-26 15:40:28 +08:00
yystopf c967684b3c 修复:去重 2025-05-26 15:00:48 +08:00
yystopf 66e7959434 修复 2025-05-26 14:18:37 +08:00
yystopf 97ed99f004 修复:分页数量 2025-05-26 14:02:08 +08:00
yystopf afc87f1393 更改:个人周报新增分页以及项目组周报创建和个人周报创建一致 2025-05-26 09:08:29 +08:00
yystopf d91b7da82c 新增:项目组本周工作项接口 2025-05-23 10:20:16 +08:00
xxq250 def1f4adf2 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop
# Conflicts:
#	app/services/api/v1/issues/update_service.rb
2025-05-22 15:33:13 +08:00
xxq250 298aec5886 fixed issue关闭时,到期结束时间更新 2025-05-22 15:32:38 +08:00
yystopf ce5d5a88ba 修复:疑修不存在 2025-05-22 14:13:50 +08:00
yystopf 78c5458bb8 修复:参数缺失 2025-05-22 14:11:09 +08:00
yystopf bf3540c250 新增:创建周报父周报存储企业标识 2025-05-22 13:59:39 +08:00
yystopf 6574ee5270 新增:issue列表查询企业标识以及移除pm_project_id验证 2025-05-22 13:52:03 +08:00
yystopf 717fb74c8a Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2025-05-22 10:50:59 +08:00
yystopf 3fe528359e 修复:自动设置结束日期的bug 2025-05-22 10:50:49 +08:00
xxq250 bf32f58813 fixed 个人所有项目包含关注的 2025-05-22 09:38:26 +08:00
yystopf 1c325f412f 新增:参数查询 2025-05-22 08:48:44 +08:00
yystopf 1af1917579 新增:自动生成周报数据返回 2025-05-21 16:14:08 +08:00
xxq250 330ab008a8 fixed memos表判断是否存在 2025-05-21 09:54:58 +08:00
xxq250 870eacaced fixed issue增加企业标识 2025-05-21 09:33:00 +08:00
xxq250 70089d06cc fixed 删除user外部方法不能放在事务中 2025-05-19 20:28:09 +08:00
xxq250 6ca55f0f61 fixed issue状态已解决增加信息记录 bug 2025-05-15 18:13:29 +08:00
xxq250 79863995d6 fixed issue状态已解决增加信息记录 2025-05-15 14:06:22 +08:00
xxq250 33138aed80 fixed readme路径转换问题处理 2025-05-12 16:00:56 +08:00
xxq250 ab576fdba5 fixed readme路径转换问题处理 2025-05-12 16:00:23 +08:00
xxq250 56212f4536 fixed settings 去掉多余配置 2025-05-09 09:44:40 +08:00
xxq250 5c916bc4e8 fixed settings 去掉多余配置 2025-05-09 09:38:57 +08:00
xxq250 558bcfeefa fixed add users phone index 2025-05-07 08:45:04 +08:00
xxq250 5c62b1d129 fixed 组织流水线启用禁用状态 2025-04-21 17:17:10 +08:00
xxq250 3d9f037025 fixed 组织流水线按仓库分页 2025-04-21 17:07:07 +08:00
xxq250 ed8593071f fixed 组织流水线按仓库分页 2025-04-21 17:05:08 +08:00
xxq250 492561c405 fixed 组织流水线按仓库分页sql 2025-04-21 16:56:18 +08:00
xxq250 b4da913f2b fixed 组织流水线按仓库分页 2025-04-21 16:53:33 +08:00
xxq250 9c593b1271 fixed 组织流水线运行数据判断是否有文件存在 2025-04-21 16:25:39 +08:00
xxq250 7ff07e9c29 fixed 组织流水线运行数据判断是否有文件存在 2025-04-21 16:05:29 +08:00
xxq250 88415e256d fixed 组织流水线运行数据控制 2025-04-21 15:53:04 +08:00
xxq250 d3bc799263 fixed 组织流水线中多仓库按文件查询 2025-04-21 15:28:36 +08:00
xxq250 44396e444b fixed 组织流水线中多仓库隔离,分页 2025-04-21 15:14:20 +08:00
xxq250 a53f2e0eb9 fixed 组织流水线中多仓库隔离 2025-04-21 15:13:17 +08:00
xxq250 3594462917 fixed 流水线删除同时删除运行日志 2025-04-21 15:03:38 +08:00
xxq250 9b8de2457d fixed 流水线重复生成 2025-04-21 14:09:35 +08:00
xxq250 0f2419cd93 fixed 流水线重复生成,分页 2025-04-21 14:07:30 +08:00
xxq250 2a1372cf5a fixed 流水线重复生成,分页 2025-04-21 14:02:03 +08:00
xxq250 bddfe9d8f7 fixed 流水线重复生成 2025-04-21 13:59:15 +08:00
xxq250 a8be844208 fixed 流水线去掉没有流水线的仓库 2025-04-21 12:07:37 +08:00
xxq250 0274456442 fixed 流水线去掉没有流水线的仓库 2025-04-21 12:06:02 +08:00
xxq250 2a0d4d6f45 fixed 流水线没有查看组织的权限 2025-04-21 12:02:01 +08:00
xxq250 4255966a5b fixed 站内信报错处理 2025-04-17 16:02:58 +08:00
xxq250 68b08d8ca4 fixed 组织流水线列表接口,组织内所有仓库,分组显示,搜索 2025-04-17 10:34:35 +08:00
xxq250 b494ed718b fixed 组织流水线列表接口,组织内所有仓库,分组显示,搜索 2025-04-17 10:33:31 +08:00
xxq250 c94111b395 fixed 组织流水线列表接口,组织内所有仓库,分组显示 2025-04-17 10:28:49 +08:00
xxq250 4b93cab54e fixed 组织流水线列表接口,组织内所有仓库,分组显示 2025-04-17 10:26:51 +08:00
xxq250 aed452e144 fixed 组织流水线列表接口,组织内所有仓库,分组显示 2025-04-17 10:25:27 +08:00
xxq250 033c5cf191 fixed 组织流水线列表接口,组织内所有仓库,group by 2025-04-17 09:13:34 +08:00
xxq250 1a21d54857 fixed 组织流水线列表接口,组织内所有仓库 2025-04-11 11:46:22 +08:00
xxq250 b74d7c8166 fixed 组织流水线列表接口 2025-04-11 11:42:03 +08:00
xxq250 d540dadb22 fixed 组织流水线列表接口 2025-04-11 11:19:23 +08:00
xxq250 3236bb37b0 fixed 流水线禁用状态最后查询 2025-04-09 15:13:13 +08:00
xxq250 5fd5431d5c fixed 导入的流水线统一先禁用 2025-04-09 15:11:21 +08:00
xxq250 dbde8aad7c fixed 流水线禁用状态 2025-04-09 15:04:31 +08:00
xxq250 19783ac526 fixed 流水线禁用状态 2025-04-09 15:03:14 +08:00
xxq250 b4fd3b851e fixed 流水线禁用状态 2025-04-09 14:58:24 +08:00
xxq250 137a67fe53 fixed 流水线禁用状态 2025-04-09 14:57:36 +08:00
xxq250 6068d44d62 fixed 后台卡片管理 2025-04-09 09:18:42 +08:00
xxq250 15704c0a75 fixed 项目查询时修正默认分支 2025-04-09 08:49:31 +08:00
xxq250 ef214af00a fixed pipeline 分支错误导致保存失败 2025-04-09 08:42:19 +08:00
xxq250 4d22889ba9 fixed pipeline log 2025-04-08 09:55:03 +08:00
xxq250 b46645fd2d fixed 参数不传时处理pipeline_name 2025-04-08 09:32:35 +08:00
xxq250 b21317eb0a fixed 参数不传时处理pipeline_name 2025-04-08 09:30:43 +08:00
xxq250 925e9f1c64 fixed 我的工作项仅显示负责人的 2025-04-07 10:17:32 +08:00
xxq250 5d804ddeb6 fixed 我的工作项仅显示负责人的 2025-04-07 10:03:14 +08:00
xxq250 1639f1d434 fixed home 统计数据 2025-04-01 17:13:17 +08:00
xxq250 6c73c6f485 Merge branch 'standalone_develop' into trustie_server 2025-04-01 11:51:53 +08:00
xxq250 e70e8db02d fixed remote_register 增加手机号 2025-04-01 11:35:00 +08:00
xxq250 076d92a3eb fixed 密码处理,兼容base64 2025-03-31 20:47:23 +08:00
xxq250 568248e6c1 fixed 工作项加到项目时project_issues_index重排序号 2025-03-25 16:17:59 +08:00
xxq250 efb4b3040d fixed 工作项加到项目时project_issues_index重排序号 2025-03-25 16:17:58 +08:00
xxq250 46873a77cd fixed 工作项加到项目时project_issues_index重排序号 2025-03-25 16:13:06 +08:00
xxq250 7fdf4e7557 fixed 工作项加到项目时project_issues_index重排序号 2025-03-25 15:51:47 +08:00
xxq250 272639f9fd Merge branch 'pre_trustie_server' into trustie_server 2025-03-25 15:41:53 +08:00
xxq250 fe77a97057 Merge branch 'standalone_develop' into pre_trustie_server 2025-03-25 15:41:24 +08:00
xxq250 cd32a3ab6c fixed 工作项加到项目时project_issues_index重排序号 2025-03-25 15:40:44 +08:00
xxq250 656fb9a2a6 fixed 项目可能不存在 2025-03-24 13:53:14 +08:00
xxq250 c9e259e2e8 Merge branch 'pre_trustie_server' into trustie_server 2025-03-20 10:32:53 +08:00
xxq250 ce5beac223 Merge branch 'standalone_develop' into pre_trustie_server 2025-03-20 10:31:58 +08:00
xxq250 b67ed4d74b fixed 流水线删除报错,判断文件不存在 2025-03-19 17:23:48 +08:00
xxq250 a06e55d30c fixed 流水线删除报错 2025-03-19 17:06:41 +08:00
xxq250 4514b8b5ff 流水线声明式,图形代统一 2025-03-19 16:51:52 +08:00
xxq250 469d086cac my_issues category=opened 2025-03-19 15:59:53 +08:00
xxq250 ec13987023 流水线pipeline_type 2025-03-19 12:04:56 +08:00
xxq250 ffa4c6e870 流水线名称保存支持重名文件 2025-03-19 11:37:19 +08:00
xxq250 e50a14595d 流水线编排保存 2025-03-17 11:53:23 +08:00
xxq250 9d3ee56b6f 流水线列表新接口,同步启用禁用状态 2025-03-17 11:48:13 +08:00
xxq250 3b04a59215 流水线保存接口 2025-03-17 11:44:15 +08:00
xxq250 cf72921eb1 流水线列表新接口,同步启用禁用状态 2025-03-17 11:35:19 +08:00
xxq250 0c5395bff6 流水线列表新接口,log 2025-03-17 11:31:15 +08:00
xxq250 b2acea82a3 流水线列表新接口,log 2025-03-17 11:23:46 +08:00
xxq250 6e92086d3e 流水线列表新接口 2025-03-17 11:23:12 +08:00
xxq250 164bcb86bd 流水线列表新接口 2025-03-17 11:20:37 +08:00
xxq250 0c438cbe21 流水线初始化,include RepositoriesHelper 2025-03-17 11:04:21 +08:00
xxq250 001f90aede 流水线初始化 2025-03-17 11:00:54 +08:00
xxq250 f738dbed24 流水线启用状态,流水线设计时 id 2025-03-17 10:16:40 +08:00
xxq250 f8f525bf91 puma config 2025-03-17 09:25:52 +08:00
xxq250 756ed9152e Merge branch 'pre_trustie_server' into trustie_server 2025-03-13 14:08:12 +08:00
xxq250 e17021b9c1 Merge branch 'standalone_develop' into pre_trustie_server 2025-03-13 14:07:15 +08:00
xxq250 1de6cc4e45 fixed pipeline_name 2025-03-13 10:36:37 +08:00
feng e0bc394bd3 add licenses show 2025-03-12 15:02:48 +08:00
feng 1ccbecc112 repo detail 接口返回license_id 2025-03-12 15:02:48 +08:00
feng 0baf0781f0 接口返回license_id 2025-03-12 15:02:47 +08:00
xxq250 e74cd4f661 fixed 流水线接口调整 2025-03-07 15:46:18 +08:00
xxq250 d5511ad8ee fixed 站内信设置可关闭开关 2025-03-07 09:09:52 +08:00
xxq250 552037642e fixed 接口限流增加白名单ip 2025-03-04 14:26:51 +08:00
xxq250 a2ad254510 fixed 接口限流增加白名单ip 2025-03-04 14:26:12 +08:00
xxq250 c7f7f255d2 fixed issue关闭时,到期结束时间更新 2025-03-03 10:56:11 +08:00
xxq250 21a78563a0 fixed issue关闭时,到期结束时间更新 2025-03-03 10:51:53 +08:00
xxq250 8b72f5157c fixed 迭代完成时,结束时间更新 2025-03-03 10:38:10 +08:00
xxq250 bcabe0e74c fixed 迭代完成时,结束时间更新 2025-03-03 10:31:26 +08:00
xxq250 150f7a485b raw api limit request.path 2025-03-03 10:28:03 +08:00
xxq250 5a1e942d1c raw api limit request.path 2025-03-03 10:28:02 +08:00
xxq250 f8b601bc9f raw api limit log 2025-03-03 10:28:02 +08:00
xxq250 8c61254a64 raw api limit 2025-03-03 10:28:02 +08:00
xxq250 7d1688c3dd raw api limit 2025-03-03 10:28:01 +08:00
xxq250 49bd1a130a raw api limit request.path 2025-02-28 22:25:05 +08:00
xxq250 ae6400a06d raw api limit request.path 2025-02-28 22:23:43 +08:00
xxq250 36c6e77f6d raw api limit log 2025-02-28 22:13:01 +08:00
xxq250 add2afeb5f raw api limit 2025-02-28 21:59:54 +08:00
xxq250 6ede037c62 raw api limit 2025-02-28 21:58:16 +08:00
xxq250 292248b9b8 raw referer 2025-02-28 21:51:18 +08:00
xxq250 144860fd2f raw referer 2025-02-28 21:47:14 +08:00
xxq250 377adf901f Merge pull request '20250225版本' (#346) from Trustie/forgeplus:trustie_server into master 2025-02-25 11:04:14 +08:00
xxq250 a1d8e4fa40 流水线节点增加参数默认值 2025-02-18 09:05:56 +08:00
yystopf 56b277d37b Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2025-02-17 11:07:09 +08:00
yystopf db396cd94f fix:导航栏放开 2025-02-17 11:07:00 +08:00
xxq250 0811de86e1 puma config example 2025-02-17 10:07:24 +08:00
yystopf 9e10625b8b Merge branch 'pre_trustie_server' into trustie_server 2025-02-14 16:35:37 +08:00
yystopf 383019b7f5 Merge branch 'standalone_develop' into pre_trustie_server 2025-02-14 16:35:09 +08:00
xxq250 3fcbf74890 fixed: 流水线启动事件pull_request支持 2025-02-13 16:06:57 +08:00
xxq250 4fe26099dd fixed: 流水线执行计数器 2025-02-13 16:01:54 +08:00
xxq250 053afec587 fixed: 流水线执行计数器 2025-02-13 15:58:12 +08:00
yystopf 874e5eeade Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2025-02-13 14:00:07 +08:00
yystopf ef18ea8cdc 更改: 转移项目精选项目清除 2025-02-13 14:00:00 +08:00
xxq250 bb55122a28 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2025-02-12 09:07:55 +08:00
xxq250 ce980714af fixed: 流水线启动事件pull_request:opened 2025-02-12 09:07:47 +08:00
yystopf 27ac452d0b Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2025-02-11 15:33:49 +08:00
yystopf bbbf4283d4 新增: filenmae 2025-02-11 15:33:23 +08:00
xxq250 2dbc7ee9f1 fixed: 流水线启动事件fork 2025-02-11 12:27:46 +08:00
xxq250 2e93b5ea34 fixed: 流水线启动事件fork 2025-02-11 12:26:08 +08:00
xxq250 19ccaa5599 fixed: 流水线启动事件fork 2025-02-11 12:24:46 +08:00
xxq250 bb14883e31 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2025-02-11 11:40:50 +08:00
xxq250 465d5db87e fixed: 流水线启动事件fork 2025-02-11 11:40:34 +08:00
yystopf 62eeda7007 fix 2025-02-11 11:31:14 +08:00
yystopf 6096234742 fix 2025-02-11 11:26:02 +08:00
yystopf 98a2bc5b4a 新增:流水线列表搜索名称 2025-02-11 11:20:02 +08:00
yystopf 8a052e30d8 修复:文件夹不存在处理 2025-02-11 09:12:27 +08:00
xxq250 5c2639773e fixed: 流水线启动事件设计时自动增加忽略流水线文件改动执行 2025-01-24 11:18:50 +08:00
xxq250 5540d8732c fixed: 流水线批量查询运行数据,改成一维数据方便使用,增加类型识别 2025-01-24 09:45:47 +08:00
xxq250 a26bbf35c5 fixed: 流水线批量查询运行数据,改成一维数据方便使用,增加类型识别 2025-01-24 09:42:45 +08:00
xxq250 4da3ac2558 fixed: 流水线批量查询运行数据,改成一维数据方便使用,结果取值key 2025-01-24 08:48:58 +08:00
xxq250 2e7e25e2d1 fixed: 流水线批量查询运行数据,改成一维数据方便使用,status 2025-01-24 08:32:53 +08:00
xxq250 5d01e8ae40 fixed: 流水线批量查询运行数据,改成一维数据方便使用 2025-01-23 16:24:08 +08:00
xxq250 2ed334707d Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2025-01-23 16:19:57 +08:00
xxq250 a73292ad98 fixed: 流水线批量查询运行数据,改成一维数据方便使用 2025-01-23 16:19:52 +08:00
yystopf dee3d1c438 修复:失败状态 2025-01-23 16:18:53 +08:00
yystopf 8a46bb263b Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2025-01-23 16:00:47 +08:00
yystopf 47627fbcaf 新增: 批量查询流水线 2025-01-23 15:56:14 +08:00
xxq250 4dd920313c fixed: 流水线批量查询运行数据 2025-01-23 11:50:54 +08:00
xxq250 54c38fd9e7 Merge pull request 'nps增加明细更新' (#330) from pre_trustie_server into trustie_server 2025-01-23 10:55:50 +08:00
xxq250 26621340f1 Merge pull request 'nps增加明细更新' (#329) from standalone_develop into pre_trustie_server 2025-01-23 10:55:12 +08:00
KingChan 00ec4a0ed8 Merge pull request '调整nps统计' (#328) from KingChan/forgeplus:standalone_develop into standalone_develop 2025-01-23 10:05:59 +08:00
feng 4d0ed530b7 nps 统计调整 2025-01-23 10:08:06 +08:00
yystopf 829d2f239d Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2025-01-22 16:50:46 +08:00
yystopf c7b399f624 新增: 流水线改版接口 2025-01-22 16:50:42 +08:00
feng 4331fc3302 nps 统计调整 2025-01-22 15:27:39 +08:00
KingChan 2a7290341f Merge pull request '调整nps统计' (#327) from KingChan/forgeplus:standalone_develop into standalone_develop 2025-01-22 15:25:19 +08:00
feng e82e63938b 新增 nps 统计 2025-01-22 15:17:45 +08:00
KingChan e447746bdb Merge pull request 'nps统计调整' (#326) from KingChan/forgeplus:standalone_develop into standalone_develop 2025-01-22 15:17:34 +08:00
yystopf 0fb6069ed6 更改:今日待办筛选状态 2025-01-17 14:49:12 +08:00
yystopf b35093e47a Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2025-01-17 14:01:15 +08:00
yystopf c94078831c 修复:今日待办时间范围包括阈值 2025-01-17 14:01:09 +08:00
xxq250 e3d21199f5 fixed: 未分类处理 2025-01-17 10:45:37 +08:00
xxq250 71a8d67515 fixed: 未分类处理 2025-01-17 10:43:31 +08:00
xxq250 504d01e038 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2025-01-16 15:22:14 +08:00
xxq250 4be2d817c9 fixed: fork,pr启动语法调整 2025-01-16 15:22:08 +08:00
yystopf 2a77ac99d9 新增: 工作台操作记录新增时间精确到秒 2025-01-16 15:17:48 +08:00
yystopf 84d6626c5c 新增:star_date和due_date到工作台我的工作项 2025-01-15 16:26:17 +08:00
yystopf 5bd686dcb4 Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2025-01-10 14:55:41 +08:00
yystopf b27dc8393d 修复: 用户排行榜统计负数处理 2025-01-10 14:55:35 +08:00
xxq250 aef492cc4f 节点库开放管理权限 2025-01-10 09:29:28 +08:00
yystopf 38d860385d fix: 动态文案调整 2025-01-09 14:45:43 +08:00
xxq250 accecb3d0c fixed 节点库参数列表接口字段 2025-01-02 16:36:41 +08:00
xxq250 956552e36f fixed 节点库参数列表接口 2025-01-02 14:43:11 +08:00
xxq250 3c3ff13ab0 fixed 节点库接口 2024-12-30 16:04:20 +08:00
xxq250 c014857cf5 fixed user 登录更新时间改为5分钟更新一次 2024-12-24 15:11:55 +08:00
xxq250 bdcd12fe74 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-12-18 11:24:16 +08:00
xxq250 96254f0cc4 fixed run_results 2024-12-18 11:24:10 +08:00
yystopf 69a143417e Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2024-12-18 10:22:44 +08:00
yystopf c99dc6647a fix: 字母错误 2024-12-18 10:22:39 +08:00
xxq250 45652f5df8 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-12-18 10:09:46 +08:00
xxq250 c472871355 fixed 调整job.id和依赖id 2024-12-18 10:09:40 +08:00
yystopf 0984ab2ad3 Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2024-12-17 17:34:23 +08:00
yystopf c96bbf5ec7 更改:计划移除两个状态 2024-12-17 17:34:17 +08:00
xxq250 e6688d9214 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-12-17 15:05:57 +08:00
xxq250 117e268306 fixed 节点数据提取后保存数据db 2024-12-17 15:05:51 +08:00
yystopf 5dc16d11c5 修复: 项目概览数量以及关联变更项问题 2024-12-16 16:04:23 +08:00
yystopf 43f33b1af2 fix: 项目概览开启中工作项包括已完成 2024-12-16 14:18:35 +08:00
yystopf e822652901 更新: 关联隐藏规则 2024-12-12 09:10:09 +08:00
yystopf 31ff7ba49e fix: 关联隐藏规则 2024-12-11 17:34:48 +08:00
yystopf f838ce4a0c fix: 关联issue隐藏逻辑 2024-12-11 17:22:27 +08:00
yystopf 406ceb0942 fix: 更改json结构 2024-12-11 15:04:51 +08:00
yystopf 3b55009473 新增: 项目概览更新 2024-12-11 14:43:21 +08:00
yystopf 9cdc593763 新增: 组织工作台部分接口以及关联工作项变动 2024-12-10 17:20:08 +08:00
xxq250 f9cf1e3a13 fixed 节点数据提取修正 2024-12-10 11:08:37 +08:00
xxq250 e5c030270b fixed job顺序执行 2024-12-10 10:31:12 +08:00
xxq250 2792c172d5 fixed 节点名称带上id,方便运行中状态读取,节点读取错误 2024-12-10 10:20:50 +08:00
xxq250 46796095cf fixed 节点名称带上id,方便运行中状态读取 log 2024-12-10 10:04:37 +08:00
xxq250 944a85dbbb fixed 节点名称带上id,方便运行中状态读取 2024-12-10 09:40:42 +08:00
xxq250 848afa3ec4 fixed 节点增加属性,节点名称带上id 2024-12-10 09:36:58 +08:00
xxq250 28f3395b05 fixed 节点增加属性,节点名称带上id 2024-12-10 09:36:49 +08:00
xxq250 35c0ac4eec fixed 可用流水线仓库actived屏蔽镜像仓库 2024-12-09 11:24:52 +08:00
xxq250 d87fe501c4 fixed 图形化流水线增加分支流程-启动节点数据变更 2024-12-06 11:47:37 +08:00
xxq250 a5e6594a37 fixed 图形化流水线增加分支流程-启动节点空处理 2024-12-06 11:36:29 +08:00
xxq250 131871dabb Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-12-06 11:33:49 +08:00
xxq250 6a0bec2d3a fixed 图形化流水线增加分支流程-启动节点 2024-12-06 11:33:35 +08:00
yystopf c038979732 更改:更新关联查询规则 2024-12-06 11:31:58 +08:00
xxq250 3ba6259d9f fixed 图形化流水线增加分支流程-提交信息 2024-12-06 11:28:05 +08:00
xxq250 8af31adf9d Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-12-06 11:25:05 +08:00
xxq250 b8de8a1d3b fixed 图形化流水线增加分支流程-启动节点 2024-12-06 11:25:01 +08:00
yystopf fdc310bc28 Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2024-12-06 11:20:59 +08:00
yystopf a6a05b69d1 更改:更新关联查询规则 2024-12-06 11:20:53 +08:00
xxq250 6142f483ca fixed 图形化流水线增加分支流程-新 2024-12-06 11:14:04 +08:00
xxq250 463a0393eb Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2024-12-06 11:11:21 +08:00
xxq250 69f801115c fixed 图形化流水线增加分支流程 2024-12-06 11:11:06 +08:00
yystopf 1681b144d6 更改:更新关联查询规则 2024-12-06 10:59:10 +08:00
yystopf 46604c1010 load_issues 2024-12-06 10:43:39 +08:00
yystopf bff1dbfc36 Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2024-12-06 10:41:22 +08:00
yystopf 840af7a73c 新增: issue所有子工作项及关联工作项 2024-12-06 10:41:15 +08:00
xxq250 d9880b66d7 fixed action节点增加属性 2024-12-03 11:48:47 +08:00
xxq250 5939e59347 fixed action类型修改为node_type 2024-12-03 11:30:23 +08:00
xxq250 1901aca44c fixed action类型修改为node_type 2024-12-03 11:27:52 +08:00
xxq250 18d575512d fixed action节点增加类型和链接控制 2024-12-03 11:23:54 +08:00
xxq250 0ca548f3a6 fixed action节点增加类型和链接控制 2024-12-03 11:13:54 +08:00
xxq250 d188e5bb7b Merge branch 'pre_trustie_server' into trustie_server 2024-11-28 17:37:12 +08:00
xxq250 f7d3e7acdf Merge branch 'standalone_develop' into pre_trustie_server 2024-11-28 17:36:49 +08:00
feng 9885881a28 Page.exist fix 2024-11-28 17:29:58 +08:00
KingChan 54fa4e0521 Merge pull request 'fix' (#325) from KingChan/forgeplus:standalone_develop into standalone_develop 2024-11-28 17:28:34 +08:00
xxq250 2b67333f74 Merge branch 'pre_trustie_server' into trustie_server 2024-11-28 17:24:27 +08:00
xxq250 de9e7cfcd6 Merge branch 'standalone_develop' into pre_trustie_server 2024-11-28 17:23:50 +08:00
feng b6645bd34a fix sitepage softbot_build 2024-11-28 17:16:00 +08:00
KingChan 13d2c3e46c Merge pull request '去掉冗余判定' (#324) from KingChan/forgeplus:standalone_develop into standalone_develop 2024-11-28 17:14:41 +08:00
xxq250 5dbf614e00 Merge branch 'pre_trustie_server' into trustie_server 2024-11-28 17:00:45 +08:00
xxq250 3d3c09a804 Merge branch 'standalone_develop' into pre_trustie_server 2024-11-28 17:00:10 +08:00
feng 10a33ace70 fix sitepage softbot_build bug 2024-11-28 16:51:21 +08:00
KingChan d2dd376323 Merge pull request '修复 softbuild 回调接口异常' (#323) from KingChan/forgeplus:standalone_develop into standalone_develop 2024-11-28 16:51:10 +08:00
yystopf 12061f4ce8 Merge branch 'pre_trustie_server' into trustie_server 2024-11-22 15:38:30 +08:00
yystopf f94d224afc Merge branch 'standalone_develop' into pre_trustie_server 2024-11-22 15:38:08 +08:00
yystopf 05ba6dda63 更改: 查询pms工作项权限使用restclient 2024-11-21 16:15:36 +08:00
yystopf e7b5039eb6 修复:非组织工作项不允许跨仓库通过commit操作 2024-11-21 15:22:30 +08:00
yystopf 58a02a0fda 更改: 删除组织密码加密处理 2024-11-20 13:56:42 +08:00
yystopf f49d5d5c3a 更改: password参数传递使用加密后的 2024-11-20 11:52:26 +08:00
yystopf a7fd0a5437 Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2024-11-19 17:24:43 +08:00
yystopf fd3bcfe92b 新增: 登陆密码加密处理 2024-11-19 17:22:58 +08:00
xxq250 de71b5e192 fixed EduSetting删除时清除缓存 2024-11-19 10:29:50 +08:00
xxq250 61098942f7 fixed EduSetting删除时清除缓存after_destroy 2024-11-19 09:07:09 +08:00
xxq250 8b968d3f1a fixed EduSetting删除时清除缓存 2024-11-19 08:33:15 +08:00
xxq250 55f60bf062 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-11-18 17:25:03 +08:00
xxq250 6287566eb8 fixed EduSetting值1位时太短异常处理 2024-11-18 17:24:57 +08:00
yystopf 73f0b2c075 Merge branch 'pre_trustie_server' into trustie_server 2024-11-18 17:23:27 +08:00
yystopf ad239580da Merge branch 'standalone_develop' into pre_trustie_server 2024-11-18 17:23:07 +08:00
yystopf de2ee51fc4 更改: compare files请求地址 2024-11-18 17:10:14 +08:00
yystopf ccb9b5f881 修复: pr查询缩小范围 2024-11-18 16:03:31 +08:00
xxq250 735a70bac6 add admin custom sidebar css 2024-11-18 15:27:35 +08:00
xxq250 5a2f1aa61e add admin custom sidebar 2024-11-18 15:25:27 +08:00
xxq250 b68c5c1351 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-11-18 15:21:27 +08:00
xxq250 ea188dd2a0 add admin custom sidebar 2024-11-18 15:21:20 +08:00
yystopf b55f24e6fe Merge branch 'pre_trustie_server' into trustie_server 2024-11-16 14:36:37 +08:00
yystopf 0336aa0cca Merge branch 'standalone_develop' into pre_trustie_server 2024-11-16 14:36:07 +08:00
yystopf c1419480a4 Merge pull request '文件变更页面优化响应速度' (#322) from feature_commit_speed into standalone_develop 2024-11-16 14:32:42 +08:00
yystopf a4c2242a8a 新增:compare接口新增filescount数据 2024-11-14 16:09:36 +08:00
yystopf ca3db4c724 fixed 2024-11-14 15:42:35 +08:00
yystopf 49e2b35a1e 更改:优化commit详情接口 2024-11-14 15:40:30 +08:00
yystopf 96a70007fd 新增: filepath特殊字符处理 2024-11-12 13:55:48 +08:00
yystopf c00d885e53 fix: compare 文件变更详情内容 2024-11-11 11:22:21 +08:00
yystopf 82e071ecf5 fix: 与旧版filenums保持一致 2024-11-11 11:14:57 +08:00
yystopf 42171cba21 fix: 与旧版filenums保持一致 2024-11-11 11:09:41 +08:00
yystopf 8cd17a42f3 更改: 新增旧版参数 2024-11-11 11:01:55 +08:00
yystopf a0138a8d7b Merge branch 'pre_trustie_server' into trustie_server 2024-11-08 13:57:57 +08:00
yystopf a3075c157b Merge branch 'standalone_develop' into pre_trustie_server 2024-11-08 13:55:39 +08:00
xxq250 a247c3ae46 fixed 群智熵汇聚 2024-11-08 13:35:23 +08:00
yystopf 6bbb4726f2 新增: compare files接口分页参数 2024-11-07 16:50:35 +08:00
yystopf 507d2cfeca 新增: compare文件变更列表拆解 2024-11-07 16:46:40 +08:00
yystopf e57910a9a8 新增: Commit文件变更列表拆解 2024-11-07 16:46:17 +08:00
yystopf fe971495cd 新增: 合并请求文件变更列表拆解 2024-11-07 16:45:40 +08:00
yystopf 6e40112138 更改: 更新gitea-client版本 2024-11-07 16:44:40 +08:00
yystopf b5d3f69f21 修复:时间nil处理 2024-11-07 11:44:26 +08:00
xxq250 25630ce40f fixed 群智熵汇聚 2024-11-06 17:22:38 +08:00
xxq250 4e9da34ac1 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-11-06 17:21:52 +08:00
xxq250 2be14cf87c fixed 群智熵汇聚 2024-11-06 17:21:43 +08:00
yystopf f5f73bfa68 更改: 导入项目数据脚本 2024-11-06 16:31:32 +08:00
xxq250 acda84fec2 Merge remote-tracking branch 'origin/trustie_server' into trustie_server 2024-11-06 16:19:56 +08:00
xxq250 cfcc0d8d0a fixed 群智熵汇聚 2024-11-06 16:19:40 +08:00
xxq250 d474a421ab Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-11-06 16:18:02 +08:00
xxq250 34b5fdfc84 fixed 群智熵汇聚 2024-11-06 16:17:56 +08:00
yystopf dd4b21115f 新增:导入另外一个平台项目数据脚本 2024-11-06 15:53:21 +08:00
yystopf 4a12ab2d90 fix: string to number 2024-11-06 11:11:06 +08:00
yystopf 1756c73a3f 新增: 关注列表时间范围查询 2024-11-06 11:10:00 +08:00
yystopf 7d6d95c7eb 新增: 关注列表\点赞列表时间范围查询 2024-11-06 11:01:58 +08:00
yystopf c5505dc4a2 新增:开源健康度接口keyid 2024-11-04 17:16:28 +08:00
yystopf 2140a163ea 新增:开源健康度量开发群 2024-11-01 09:39:12 +08:00
yystopf 4f1a984a7f 新增:用户项目时间筛选项 2024-10-28 20:44:17 +08:00
yystopf e448433ced 新增:用户项目时间筛选项 2024-10-28 20:43:00 +08:00
yystopf a5a0351266 新增:用户项目时间筛选项 2024-10-28 20:40:43 +08:00
yystopf c0ebb7431e 新增:用户项目时间筛选项 2024-10-28 20:28:17 +08:00
yystopf 7392e3e338 新增: pull_created_unix字段至新接口 2024-10-28 14:26:29 +08:00
xxq250 732b273ad7 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-10-28 08:58:19 +08:00
xxq250 b03c1bb7a2 fixed UserAction in_threads=1 2024-10-28 08:58:14 +08:00
yystopf 2f6dda4a15 Gemfile回退 2024-10-27 20:07:43 +08:00
yystopf be4726c6a6 Gemfile 回退 2024-10-27 20:01:53 +08:00
yystopf a4f2243a7a 新增:pr列表返回创建时间戳 2024-10-27 19:58:38 +08:00
xxq250 301a7f70d2 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-10-25 16:51:33 +08:00
xxq250 ee520940de fixed 增加敏感词检测 2024-10-25 16:51:26 +08:00
yystopf ba20708514 Merge branch 'pre_trustie_server' into trustie_server 2024-10-25 15:32:39 +08:00
yystopf 64ffab243c Merge branch 'standalone_develop' into pre_trustie_server 2024-10-25 15:31:56 +08:00
yystopf b891d99569 fix 2024-10-25 14:27:48 +08:00
yystopf e9b8f2aee7 更改: 移除管理员在commit可以操作任意issue 2024-10-25 13:49:29 +08:00
yystopf 3958944bf1 修复: 判断工作项是否在组织内以及是否有组织的权限 2024-10-25 11:49:45 +08:00
xxq250 cf519788d1 fixed 增加敏感词检测 2024-10-25 10:02:32 +08:00
xxq250 67b7206183 fixed ci4s oauth2接入 user_info log 2024-10-23 14:56:07 +08:00
xxq250 527c1a5e9c fixed ci4s oauth2接入 user_info log 2024-10-23 14:03:46 +08:00
xxq250 13da8e3577 fixed ci4s oauth2接入 user_info 2024-10-23 13:57:30 +08:00
xxq250 52f43dbcc3 fixed ci4s oauth2接入 user_info 2024-10-23 11:52:53 +08:00
xxq250 3a460b3b1d fixed ci4s oauth2接入 user_info 2024-10-23 11:48:25 +08:00
xxq250 45f597ab47 fixed ci4s oauth2接入 log 2024-10-23 11:41:58 +08:00
xxq250 04da22ed64 fixed ci4s oauth2接入 log 2024-10-23 11:25:11 +08:00
xxq250 36409600ea fixed ci4s oauth2接入 log 2024-10-23 11:23:44 +08:00
xxq250 c93ae8ebae fixed ci4s oauth2接入 2024-10-23 11:21:04 +08:00
xxq250 d038f30994 fixed ci4s oauth2接入 2024-10-23 11:19:02 +08:00
xxq250 c0da80139a fixed ci4s oauth2接入 2024-10-23 11:13:26 +08:00
xxq250 d6ac38a9ce Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-10-23 11:11:22 +08:00
xxq250 dd3c14e50e fixed ci4s oauth2接入 2024-10-23 11:11:14 +08:00
yystopf 271e1f4ac7 新增: 项目搜索标签关联记录复合唯一验证 2024-10-23 09:27:57 +08:00
yystopf 2cd36d019c 新增:更新项目搜索标签加锁 2024-10-22 17:30:56 +08:00
xxq250 8db7bbd51c Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2024-10-22 11:09:19 +08:00
xxq250 6e6a15bbc1 fixed raw request.referer 防盗链 2024-10-22 11:09:11 +08:00
xxq250 23c0bcbf36 fixed oauth2用户接口用户信息过滤表情 2024-10-22 11:09:11 +08:00
xxq250 0d2ed00e4c fixed raw request.referer 防盗链 2024-10-22 09:27:53 +08:00
yystopf a3ee98125b 修复: journal来源解析 2024-10-21 11:37:45 +08:00
yystopf 12c020f315 修复:journal来源解析 2024-10-21 11:29:48 +08:00
yystopf 256f29b7f4 新增:更改来源解析url 2024-10-21 11:17:31 +08:00
yystopf 151e028d34 新增:记录journal来源 2024-10-21 10:45:30 +08:00
yystopf ee1b7c8f57 修复:commit关联issue操作者变更为提交者 2024-10-19 10:48:38 +08:00
yystopf e8112212bb 新增:commit message关联issue操作状态 2024-10-18 16:32:21 +08:00
xxq250 7303be9db2 fixed oauth2用户接口用户信息过滤表情 2024-10-18 09:13:15 +08:00
xxq250 3e09ee08d3 fixed get_file request.referer 防盗链优化处理 2024-10-17 16:25:18 +08:00
xxq250 84a46a1042 fixed get_file request.referer 防盗链 2024-10-17 16:25:17 +08:00
xxq250 d887eb5d41 fixed get_file request.referer 测试 2024-10-17 16:25:17 +08:00
xxq250 ba7f36c34c fixed get_file request.referer 防盗链优化处理 2024-10-17 16:21:19 +08:00
xxq250 c89493d6e9 fixed get_file request.referer 防盗链 2024-10-17 16:06:26 +08:00
xxq250 2084698801 fixed get_file request.referer 测试 2024-10-17 15:57:48 +08:00
xxq250 3229ef5e2e fixed get_file request.referer 2024-10-17 15:33:57 +08:00
xxq250 fc972a9cad fixed get_file request.referer 2024-10-17 15:28:40 +08:00
xxq250 17c8866d64 fixed get_file ref空处理 2024-10-17 15:24:41 +08:00
xxq250 267adf354b fixed get_file ref空处理 2024-10-17 14:37:35 +08:00
xxq250 e91ae81589 fixed gitea文件下载缓存,md5 tmp_path 2024-10-17 14:33:07 +08:00
xxq250 e94e45bb63 fixed gitea文件下载缓存,md5 file 2024-10-17 14:33:07 +08:00
xxq250 3597dc38e7 fixed gitea文件下载缓存,md5 2024-10-17 14:33:07 +08:00
xxq250 f33e583ca4 fixed gitea文件下载缓存,md5 tmp_path 2024-10-17 14:26:57 +08:00
xxq250 8a14530395 fixed gitea文件下载缓存,md5 file 2024-10-17 14:25:36 +08:00
xxq250 c37a076868 fixed gitea文件下载缓存,md5 2024-10-17 14:22:12 +08:00
xxq250 bffecfc0e4 fixed gitea文件下载缓存,更改目录 2024-10-17 14:03:49 +08:00
xxq250 0dd1748f1b fixed gitea文件下载缓存,更改目录 2024-10-17 14:03:48 +08:00
xxq250 f896735710 fixed gitea文件下载缓存,更改目录 2024-10-17 14:03:48 +08:00
xxq250 fec67e64e5 fixed gitea文件下载缓存,更改目录 2024-10-17 14:03:48 +08:00
xxq250 314ccdba0b fixed gitea文件下载缓存,更改目录 2024-10-17 12:00:31 +08:00
xxq250 670f05c658 fixed gitea文件下载缓存,更改目录 2024-10-17 11:58:53 +08:00
xxq250 e0b47faec9 fixed gitea文件下载缓存,更改目录 2024-10-17 11:51:59 +08:00
xxq250 768b4f1f57 fixed gitea文件下载缓存,更改目录 2024-10-17 11:47:58 +08:00
xxq250 2055a5a3a6 gitea文件下载缓存,更改目录 2024-10-17 11:33:40 +08:00
xxq250 f2ab9f6a28 gitea文件下载缓存 2024-10-17 11:33:40 +08:00
xxq250 04a8d194cc gitea文件下载缓存,更改目录 2024-10-17 11:28:20 +08:00
xxq250 dff3c9061e Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-10-17 11:15:05 +08:00
xxq250 9db6713a34 gitea文件下载缓存 2024-10-17 11:14:33 +08:00
xxq250 2e773e92fb oauth2已登录跳转 2024-10-16 13:47:46 +08:00
xxq250 db736cae66 oauth2已登录跳转 2024-10-16 13:44:55 +08:00
yystopf 55b3eea277 Merge branch 'standalone_develop' of code.gitlink.org.cn:Trustie/forgeplus into standalone_develop 2024-10-15 14:05:10 +08:00
yystopf a434fc59f5 更改:根据id查询issue pr缩小范围 2024-10-15 14:04:07 +08:00
xxq250 13517c8eab Merge branch 'pre_trustie_server' into trustie_server 2024-10-15 08:59:31 +08:00
xxq250 1bf1651b0c Merge branch 'standalone_develop' into pre_trustie_server 2024-10-15 08:58:28 +08:00
xxq250 77f31e3a78 脚本:增加成员用户到批量仓库 2024-10-14 11:56:55 +08:00
xxq250 7675370239 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-10-14 11:56:12 +08:00
xxq250 bd0e456b9f 脚本:增加成员用户到批量仓库 2024-10-14 11:56:07 +08:00
yystopf 359f1c40f6 修复:更新issue protrend未正常创建错误 2024-10-12 15:03:43 +08:00
yystopf 9ac8bac777 修复:更新issue protrend未正常创建错误 2024-10-12 14:54:01 +08:00
xxq250 8bf6f24fe6 fixed 删除用户时issue,pr,评论用户显示已注销 2024-10-11 15:35:40 +08:00
xxq250 098b045315 fixed 删除用户图标 2024-10-11 15:01:32 +08:00
xxq250 c8e9c705f3 fixed 删除用户图标 2024-10-11 14:57:06 +08:00
xxq250 bb7125f266 fixed 删除用户图标 2024-10-11 14:53:36 +08:00
xxq250 87c8598c4b fixed 删除用户时文案调整 2024-10-11 11:42:04 +08:00
xxq250 7f93c068b7 fixed 未登录用户默认头像 2024-10-11 09:35:57 +08:00
xxq250 97d23f8fdc fixed 删除用户时issue,pr,评论用户显示已注销 2024-10-11 09:01:21 +08:00
xxq250 ef64e69aaa fixed 删除用户时保留项目动态数据 2024-10-11 08:47:42 +08:00
xxq250 28fea9a872 fixed 删除用户时保留项目动态数据 2024-10-11 08:46:53 +08:00
xxq250 7b12526963 fixed 删除用户时保留项目动态数据 2024-10-11 08:44:51 +08:00
xxq250 1e82f5ba91 fixed 删除用户时保留项目动态数据 2024-10-11 08:43:43 +08:00
xxq250 bfb3381829 fixed 删除用户时保留项目动态数据 2024-10-11 08:34:40 +08:00
xxq250 382ac02b81 fixed 项目统计异步异常处理 2024-10-10 10:09:02 +08:00
xxq250 55f3890ccf fixed 删除用户时issue,pr用户显示已注销 2024-10-10 09:57:25 +08:00
xxq250 b07fa509e1 fixed 删除用户时保留附件数据 2024-10-10 09:38:29 +08:00
xxq250 ebb1ff76ea fixed 后台项目列表支持id查询 2024-10-09 17:18:32 +08:00
xxq250 9c8e3f44bb fixed 后台变量配置样式 2024-10-09 16:51:07 +08:00
xxq250 1233daa466 fixed 删除用户时issue,pr用户显示已注销 2024-10-09 16:16:52 +08:00
xxq250 1459e2f626 fixed 删除用户时issue,pr用户显示已注销 2024-10-09 16:09:42 +08:00
xxq250 71bdde79ef fixed 删除用户时issue,pr用户显示已注销 2024-10-09 15:55:42 +08:00
xxq250 6f8ccea616 fixed 删除用户时issue,pr用户显示已注销 2024-10-09 15:41:29 +08:00
xxq250 34ee9d1cbf fixed 删除用户时issue,pr用户显示已注销 2024-10-09 15:38:12 +08:00
xxq250 2e0eab0d59 fixed 删除用户时issue,pr用户显示已注销 2024-10-09 15:36:18 +08:00
xxq250 d5656f1d7a fixed 删除用户时issue,pr用户显示已注销 2024-10-09 15:34:19 +08:00
xxq250 4002245601 fixed 删除用户时issue,pr用户显示已注销 2024-10-09 15:31:17 +08:00
xxq250 4e855a2a7b fixed 删除用户时issue,pr跟随项目数据 2024-10-09 15:00:23 +08:00
xxq250 5c2f84141e Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-10-08 15:01:43 +08:00
xxq250 66a7c4eb00 fixed 删除用户时删除讨论数据 2024-10-08 15:01:38 +08:00
yystopf bd19bb1251 修复:owners获取id回退到之前版本 2024-10-08 11:22:42 +08:00
xxq250 94667f4b71 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-10-08 11:17:29 +08:00
xxq250 05e3036a2f fixed 删除组织id支持特殊符号代码 2024-10-08 11:17:14 +08:00
yystopf ea76beb1bf 修复:处理owners .json后缀 2024-10-08 10:22:13 +08:00
xxq250 65a7af3d6e fixed 组织id支持特殊符号 2024-10-08 09:27:10 +08:00
xxq250 afb3272cf3 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-09-30 14:50:04 +08:00
xxq250 b9b3d875ed fixed 检测用户拥有组织数量 2024-09-30 14:48:04 +08:00
yystopf 83dc605c26 修复:项目概览无法正常添加附件 2024-09-27 15:04:10 +08:00
xxq250 d5a2580ae9 项目删除记录日志 2024-09-27 14:27:36 +08:00
xxq250 75c61bfff5 合并区块确认查询 2024-09-27 14:19:52 +08:00
xxq250 f213ce23af 操作记录记录显示调整 2024-09-27 11:42:16 +08:00
xxq250 3f9cac37c8 操作记录记录显示调整 2024-09-27 11:37:09 +08:00
xxq250 25978fb97e 操作记录记录显示调整,不存在用户仅显示id 2024-09-27 11:35:28 +08:00
xxq250 c73e138ee7 操作记录记录显示调整,不存在用户仅显示id 2024-09-27 11:33:42 +08:00
xxq250 6924366e02 操作记录记录显示调整,不存在用户仅显示id 2024-09-27 11:28:59 +08:00
xxq250 6574aff205 fixed 检测用户不存在时清除cookie 2024-09-27 11:17:59 +08:00
xxq250 cb693dca8b 操作记录记录显示调整 2024-09-27 11:15:45 +08:00
xxq250 4329f9dbf0 操作记录记录显示调整 2024-09-27 11:11:53 +08:00
xxq250 80828d85d7 操作记录记录用户信息 2024-09-27 10:47:16 +08:00
xxq250 19cf675f2e 操作记录记录用户信息 2024-09-27 10:42:03 +08:00
xxq250 3fae388d92 操作记录记录用户信息 2024-09-27 10:24:40 +08:00
xxq250 25321648f6 操作记录记录用户信息 2024-09-27 10:22:30 +08:00
xxq250 11eb5d3f98 操作记录后台查询,文案调整 2024-09-27 10:16:58 +08:00
xxq250 17d47170ba 操作记录后台查询,文案调整 2024-09-27 10:16:07 +08:00
xxq250 f4525d6744 操作记录后台查询,增加操作人 2024-09-27 10:13:35 +08:00
xxq250 cf36e89f56 操作记录后台查询菜单 2024-09-27 10:02:40 +08:00
xxq250 29ee61ab1b 操作记录后台查询菜单 2024-09-27 09:55:53 +08:00
xxq250 2381851c88 操作记录后台查询菜单 2024-09-27 09:44:06 +08:00
xxq250 a628043efe Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-09-27 09:35:46 +08:00
xxq250 47f8ce478c 操作记录后台查询 2024-09-27 09:35:40 +08:00
yystopf 7f4bb60b5e 修复:操作日志兼容旧issue模块 2024-09-26 17:00:17 +08:00
xxq250 20543c6bc2 调整建木ci激活接口 2024-09-26 13:54:19 +08:00
xxq250 610db14bc9 调整用户删除检测接口 2024-09-25 16:21:33 +08:00
xxq250 9954a5f92f 用户删除接口 2024-09-25 16:12:24 +08:00
xxq250 59065ae1e9 用户删除接口 2024-09-25 16:11:49 +08:00
xxq250 75153cb099 用户删除接口 2024-09-25 15:40:53 +08:00
xxq250 3cce800746 fixed 用户删除优化处理,多个owner时,仅将用户从组织移除, 一个时直接删除 2024-09-25 14:03:09 +08:00
xxq250 3b5894894f fixed 用户删除优化处理,多个owner时,仅将用户从组织移除, 一个时直接删除 2024-09-25 14:01:37 +08:00
xxq250 e29b6181bc fixed 用户删除优化处理,多个owner时,仅将用户从组织移除, 一个时直接删除 2024-09-25 11:50:55 +08:00
xxq250 d1968a63c1 fixed 用户删除优化处理,多个owner时,仅将用户从组织移除, 一个时直接删除 2024-09-25 11:47:15 +08:00
xxq250 5f3aaa03eb fixed 用户删除优化处理 2024-09-25 11:43:43 +08:00
xxq250 2faea9aa59 fixed 用户删除优化处理 2024-09-25 11:40:13 +08:00
xxq250 2148d5a0ce fixed 检测用户不存在时清除cookie log 2024-09-24 17:17:03 +08:00
xxq250 30ec8ef1ce fixed 检测用户不存在时清除cookie 2024-09-24 17:13:01 +08:00
xxq250 5c3a988336 fixed 检测用户不存在时清除cookie 2024-09-24 17:10:45 +08:00
xxq250 ca226e1f81 fixed 账号相关方法增加登录验证,安全校验 2024-09-24 16:34:05 +08:00
xxq250 484346d542 fixed 账号相关方法增加登录验证 2024-09-24 16:28:58 +08:00
xxq250 b51f31cb6b fixed 多浏览器退出账号时,token不存在处理 2024-09-24 11:48:05 +08:00
xxq250 8b8388f8db Merge branch 'pre_trustie_server' into trustie_server 2024-09-20 17:21:43 +08:00
xxq250 2dd567d212 Merge branch 'standalone_develop' into pre_trustie_server 2024-09-20 17:21:16 +08:00
xxq250 6ecf46e88d fixed issue增加pm相关查询索引 2024-09-20 17:20:44 +08:00
yystopf 8264bb8107 修复:split nil错误 2024-09-19 16:52:46 +08:00
xxq250 6ba0374119 fixed 头歌接口增加安全参数 2024-09-18 15:53:20 +08:00
xxq250 bf7178fb37 fixed 头歌接口增加安全参数 2024-09-18 15:50:43 +08:00
xxq250 53988cf557 fixed 授权登录session 2024-09-18 15:22:46 +08:00
xxq250 ba77db7cc3 fixed 授权登录session 2024-09-18 15:20:34 +08:00
xxq250 f221e9c069 Merge branch 'pre_trustie_server' into trustie_server 2024-09-18 11:51:30 +08:00
xxq250 cc8899906f Merge branch 'standalone_develop' into pre_trustie_server 2024-09-18 11:50:42 +08:00
xxq250 441ced217b Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-09-18 11:49:19 +08:00
xxq250 5823ec6f8c fixed issue总数修正 2024-09-18 11:49:10 +08:00
yystopf 46381e90d1 修复:项目查询标签未返回全部 2024-09-18 11:01:33 +08:00
yystopf 7f19972347 fix 2024-09-14 14:18:51 +08:00
yystopf 7bc213fe88 Merge branch 'pre_trustie_server' into trustie_server 2024-09-14 11:45:12 +08:00
yystopf 91125c5e44 Merge branch 'standalone_develop' into pre_trustie_server 2024-09-14 11:45:00 +08:00
yystopf a465849391 修复:BigDecimal 改为to_f 2024-09-14 11:44:26 +08:00
yystopf 1e47fa7c91 Merge branch 'pre_trustie_server' into trustie_server 2024-09-14 09:39:18 +08:00
yystopf b63b15c7fd Merge branch 'standalone_develop' into pre_trustie_server 2024-09-14 09:39:05 +08:00
yystopf f079a812b1 add: pm_links index options 2024-09-14 09:38:32 +08:00
yystopf 38ef156b55 Merge branch 'pre_trustie_server' into trustie_server 2024-09-14 08:42:11 +08:00
yystopf 26736a1cd6 Merge branch 'standalone_develop' into pre_trustie_server 2024-09-14 08:40:33 +08:00
yystopf e2c3de3601 修复:has_pull_request丢失以及冗余关系apply_signatures移除 2024-09-13 15:00:12 +08:00
yystopf b676462dd7 修复:open_portrait函数丢失 2024-09-13 14:29:35 +08:00
yystopf cadafb6fe0 更改:测试环境debug用户id 2024-09-13 14:03:58 +08:00
yystopf 2e6544031d Merge branch 'pm_project_develop' into standalone_develop 2024-09-13 13:49:13 +08:00
yystopf 0d1ca7bc49 修复:处理禅道图片函数 2024-09-13 13:48:26 +08:00
xxq250 8ccaedd3d1 短信ip限制2小时30次 2024-09-12 17:24:39 +08:00
yystopf 4fbbe88ca9 更改:pms_enable 大小写模糊 2024-09-12 17:04:43 +08:00
yystopf 1a6d333c1a 新增:gemfile 指定 loofah版本 2024-09-12 16:45:19 +08:00
xxq250 a33a26a87e 合并代码错误 2024-09-12 15:50:02 +08:00
xxq250 1d3bf34da6 组织配置是否可开启pms 2024-09-12 15:29:44 +08:00
xxq250 6a87765f3d 区块确权项目查询token 2024-09-12 14:29:31 +08:00
xxq250 a18bc247bb 用户组织图片不存在时处理 2024-09-12 14:27:23 +08:00
yystopf 98f2898395 更改:移除上次更改 2024-09-12 13:39:32 +08:00
yystopf 5b7eaa0663 Merge branch 'pm_project_develop' of https://gitlink.org.cn/Trustie/forgeplus into pm_project_develop 2024-09-12 12:01:20 +08:00
yystopf fbbfab7a31 更改:工作项分布移除已关闭的数量 2024-09-12 12:01:11 +08:00
xxq250 f6a2883c00 组织配置是否可开启pms 2024-09-12 10:10:22 +08:00
xxq250 421fba24c2 组织配置是否可开启pms 2024-09-12 10:07:46 +08:00
yystopf eaeb65443e Merge branch 'standalone_develop' into pm_project_develop 2024-09-12 09:21:10 +08:00
yystopf f81bd6bffb 修复:某个版本无法识别多态关联 2024-09-12 09:12:24 +08:00
yystopf 444ce3764b 修复:解析禅道描述里的图片 2024-09-11 16:30:48 +08:00
yystopf ba1251be28 Merge branch 'pm_project_develop' of https://gitlink.org.cn/Trustie/forgeplus into pm_project_develop 2024-09-11 11:30:07 +08:00
yystopf 2033b2cbf0 add: debug user 2024-09-11 11:30:00 +08:00
xxq250 192e555315 fixed is_local标识 2024-09-10 14:05:15 +08:00
yystopf 3760eab73d 修复:The target couldn't be found 2024-09-06 16:36:58 +08:00
yystopf 1026a5ea3d Merge branch 'pre_trustie_server' into trustie_server 2024-09-06 10:24:05 +08:00
yystopf 2a1b9792cd Merge branch 'standalone_develop' into pre_trustie_server 2024-09-06 10:23:45 +08:00
yystopf 844811bc48 '新增:导出工作项表头星号’ 2024-09-05 10:29:11 +08:00
yystopf 033c65b46f 修复:The target couldn't be found 2024-09-05 09:18:07 +08:00
yystopf 973e18812c 新增:gitlink、gitea、gitcode的token校验以及请求超时时间的更改 2024-09-04 14:33:47 +08:00
yystopf 8588c486e3 修复 2024-09-04 09:46:39 +08:00
yystopf 46124f7f15 修复 2024-09-03 10:49:09 +08:00
yystopf 9ec3f4655e 修复 2024-09-03 10:40:27 +08:00
yystopf cd71532dd7 修复:导入禅道脚本无法导入迭代数据 2024-09-03 10:13:38 +08:00
xxq250 cbdbc4b25e fixed 个人项目列表条件增加标签名查询,索引失效 2024-08-29 17:10:14 +08:00
xxq250 5b9b08c05d fixed 个人项目列表条件增加标签名查询,索引失效 2024-08-29 17:08:31 +08:00
xxq250 ccfe28ceb9 Merge branch 'standalone_develop' into trustie_server 2024-08-29 16:31:45 +08:00
xxq250 4d75e4a174 fixed 个人项目列表条件增加标签名查询 2024-08-29 16:31:19 +08:00
xxq250 d10334a825 fixed 个人项目列表条件增加标签名查询 2024-08-29 16:25:14 +08:00
xxq250 30eedbafb9 fixed 个人项目列表条件增加标签名查询 2024-08-29 16:24:43 +08:00
xxq250 7b6845ec3e fixed 个人项目列表条件增加标签名查询 2024-08-29 16:22:28 +08:00
xxq250 f80a33c9df Merge branch 'standalone_develop' into trustie_server 2024-08-29 16:21:18 +08:00
xxq250 39f234cc06 fixed 个人项目列表条件增加标签名查询 2024-08-29 16:18:59 +08:00
xxq250 04f8bcb1b0 fixed 项目列表条件count增加标签名 2024-08-29 16:05:32 +08:00
xxq250 0559110d12 fixed 项目列表条件count增加标签名 2024-08-29 16:05:18 +08:00
xxq250 05dd162646 fixed 项目列表支持多个标签名称查询, 定制项目标签可查自己私有仓 2024-08-29 16:02:25 +08:00
xxq250 9f269189a4 fixed 项目列表支持多个标签名称查询, 定制项目标签可查自己私有仓 2024-08-29 16:00:46 +08:00
yystopf 12ae3b94d9 修复 2024-08-29 16:00:44 +08:00
yystopf b153a486f3 更改:导入禅道数据脚本修改 2024-08-29 14:31:58 +08:00
yystopf 0852a70417 更改:文件返回type 2024-08-28 11:55:35 +08:00
yystopf eff2b1fe36 更改:导入工作项为post方式 2024-08-28 10:37:37 +08:00
yystopf 0dea83488d Merge branch 'pre_trustie_server' into trustie_server 2024-08-27 16:37:04 +08:00
yystopf 792810f4a9 Merge branch 'standalone_develop' into pre_trustie_server 2024-08-27 16:36:43 +08:00
yystopf 9c2990e3f8 修复:用户反馈输入框无法点击 2024-08-27 16:31:56 +08:00
yystopf 75011f66c3 修复:child_count的更新 2024-08-27 14:20:35 +08:00
yystopf 9e6ea77bf9 新增:返回信息 2024-08-27 13:58:35 +08:00
yystopf fb572af48f 新增:导出工作项关联工作项记录 2024-08-27 13:42:02 +08:00
yystopf 2ee2a5f3f3 修复:repository service不存在 2024-08-23 16:14:50 +08:00
yystopf 655ac8ec67 fix 2024-08-23 16:04:04 +08:00
xxq250 adf77df1bf Merge pull request '20240823版本' (#345) from Trustie/forgeplus:trustie_server into master 2024-08-23 15:06:57 +08:00
yystopf 771798220c 新增:导入项目服务参数 2024-08-23 10:02:07 +08:00
yystopf 9f0956ac75 Merge branch 'pm_project_develop' of https://gitlink.org.cn/Trustie/forgeplus into pm_project_develop 2024-08-22 15:05:06 +08:00
xxq250 96e346c4e9 Merge remote-tracking branch 'origin/pm_project_develop' into pm_project_develop 2024-08-22 14:58:17 +08:00
xxq250 4516558e6f fixed 附件增加参数过虑导入失败项目 2024-08-22 14:58:02 +08:00
yystopf 958631ce36 更改:禅道导入数据脚本 2024-08-22 14:54:06 +08:00
yystopf 118edbf61f 更改:禅道导入数据脚本 2024-08-22 14:53:00 +08:00
xxq250 1d9387e1ab Merge remote-tracking branch 'origin/pm_project_develop' into pm_project_develop 2024-08-22 14:27:00 +08:00
xxq250 d69438454d fixed 附件uuid查询精准匹配 2024-08-22 14:20:19 +08:00
yystopf 63753c3963 修复:推送代码冲突 2024-08-21 17:36:03 +08:00
yystopf 0643d24486 修复 2024-08-21 17:30:14 +08:00
yystopf 1a374468ea 修复 2024-08-21 17:23:13 +08:00
yystopf 91399808c4 新增:创建操作记录逻辑 2024-08-21 16:05:45 +08:00
xxq250 11743355ef fixed 项目列表支持多个标签名称查询 2024-08-21 11:07:18 +08:00
xxq250 fde238eb1b fixed 项目列表支持多个标签名称查询 2024-08-21 11:06:43 +08:00
xxq250 19c2367257 fixed 项目列表支持多个标签名称查询 2024-08-21 11:00:54 +08:00
yystopf 69b5cae870 fix 2024-08-20 16:43:31 +08:00
yystopf a8b0435c94 fix 2024-08-20 16:34:28 +08:00
yystopf 854df00ffb 新增:操作日志旧数据适配 2024-08-20 16:32:19 +08:00
yystopf b7aa1e51b3 新增:操作日志类型 2024-08-20 15:56:40 +08:00
yystopf 233642d903 Merge branch 'pre_trustie_server' into trustie_server 2024-08-13 15:48:35 +08:00
yystopf fd54d4d10c Merge branch 'standalone_develop' into pre_trustie_server 2024-08-13 15:48:19 +08:00
yystopf f66e6a7774 fix:访问项目权限 2024-08-13 15:47:26 +08:00
yystopf 65dba54a41 Merge branch 'pre_trustie_server' into trustie_server 2024-08-12 15:04:58 +08:00
yystopf 913f4faefd Merge branch 'standalone_develop' into pre_trustie_server 2024-08-12 15:04:40 +08:00
yystopf 435f458f6a 新增:acge查询用户标识接口 2024-08-12 15:01:52 +08:00
yystopf 8819c9b9ae Merge branch 'pre_trustie_server' into trustie_server 2024-08-09 11:31:07 +08:00
yystopf 61a36cc847 Merge branch 'standalone_develop' into pre_trustie_server 2024-08-09 11:30:23 +08:00
yystopf bd9ca0439c 新增:许可证排序字段 2024-08-09 11:22:45 +08:00
yystopf f1a79d926c 更改:nil判断 2024-08-07 11:27:14 +08:00
yystopf 97685bf68c 更改:读取文件形式 2024-08-07 11:23:11 +08:00
yystopf 6f0afffb3b 新增:导入导出工作项接口 2024-08-07 11:01:24 +08:00
yystopf 6ba2d39e9b 更改:删除接口走gitea_hat 2024-07-22 17:13:39 +08:00
xxq250 2b55bfacf8 Merge remote-tracking branch 'origin/trustie_server' into trustie_server 2024-07-22 09:42:08 +08:00
xxq250 97af146a30 sitemaptest.xml 2024-07-22 09:41:56 +08:00
yystopf 8725e9ef8c 修复:创建表索引错误修复 2024-07-19 14:55:59 +08:00
yystopf b7c009ae94 Merge branch 'pre_trustie_server' into trustie_server 2024-07-19 14:34:28 +08:00
yystopf 1fc75379e4 Merge branch 'standalone_develop' into pre_trustie_server 2024-07-19 14:34:13 +08:00
yystopf c9df8fa3fe 新增:存储pull_request源仓库信息 2024-07-19 11:17:15 +08:00
yystopf f9e7dafefd 新增:删除fork仓库关闭对应合并请求 2024-07-19 09:46:57 +08:00
yystopf c362315ea5 新增:后台管理项目列表项目类别筛选 2024-07-18 15:32:34 +08:00
yystopf d109859149 fix 2024-07-17 16:04:21 +08:00
yystopf 8177606f81 fix 2024-07-17 15:51:15 +08:00
yystopf 6dda125a1c 新增:返回是否有合并请求字段 2024-07-17 14:31:23 +08:00
yystopf baa2c62186 fix 2024-07-17 14:05:20 +08:00
yystopf da6931d790 fix 2024-07-16 10:23:21 +08:00
yystopf 21eb842766 新增:列表返回是否置顶字段 2024-07-16 10:17:09 +08:00
yystopf d577f1691a 新增:个人主页置顶功能 2024-07-16 10:08:43 +08:00
yystopf ecde7be506 Merge branch 'pre_trustie_server' into trustie_server 2024-07-12 17:06:00 +08:00
yystopf 87bcc7b8d0 Merge branch 'standalone_develop' into pre_trustie_server 2024-07-12 17:05:37 +08:00
yystopf 785275c65b 更改:后台管理隐藏卡片管理 2024-07-12 15:30:02 +08:00
yystopf f36a0f18ad 新增:项目列表返回具体时间 2024-07-12 14:58:24 +08:00
yystopf cc5a671458 Merge branch 'standalone_develop' into pm_project_develop 2024-07-11 10:39:07 +08:00
yystopf 99266bce7e 新增:流水线运行接口 2024-07-11 10:38:26 +08:00
yystopf 7dda079ff3 Merge branch 'standalone_develop' into pm_project_develop 2024-07-11 10:07:20 +08:00
yystopf c640b81de2 更改:项目列表返回具体时间 2024-07-09 17:28:52 +08:00
yystopf 79e3ac3fa8 Merge branch 'pre_trustie_server' into trustie_server 2024-07-05 15:05:34 +08:00
yystopf a34f17b669 Merge branch 'standalone_develop' into pre_trustie_server 2024-07-05 15:05:03 +08:00
yystopf b0ec4d7e9e 更改:创建项目强关联 2024-07-04 16:47:25 +08:00
yystopf 389a72b0a1 新增:时间返回 2024-07-04 15:12:31 +08:00
yystopf 90fa4774d8 新增:时间返回 2024-07-04 15:09:22 +08:00
yystopf 551f9cbbad 新增:创建项目建立与gitea的关联关系 2024-07-03 10:54:33 +08:00
yystopf a30a5b09a0 修复:导入项目同步默认分支 2024-07-03 10:18:01 +08:00
yystopf c9d8ce073f 新增:gitlink菜单权限 2024-07-01 09:55:20 +08:00
yystopf ae842938c2 新增:gitlink角色分级菜单完成 2024-06-28 11:51:55 +08:00
yystopf c2f8da0dd1 新增:修改文件需要验证用户权限 2024-06-28 09:44:13 +08:00
KingChan 11f0373c26 Merge pull request '修复bug' (#320) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-27 16:04:22 +08:00
kingChan 07bc3b4eab fix bug 2024-06-27 16:04:03 +08:00
KingChan 2ca8c90487 Merge pull request '调整sonar component' (#318) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-27 15:48:41 +08:00
kingChan 40423aabf7 update login to id 2024-06-27 15:47:53 +08:00
KingChan f70cbc09b4 Merge pull request '修复进入关联子项后删除关联失败问题' (#317) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-27 15:43:58 +08:00
kingChan e22b2c8c29 update 2024-06-27 15:43:38 +08:00
kingChan fe924527ec 修复进入关联子项后删除关联失败问题 2024-06-27 15:42:38 +08:00
KingChan fc1fa8de23 Merge pull request '修复bug' (#315) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-27 15:02:05 +08:00
kingChan 290f5cc161 update TransferService update actions 2024-06-27 15:01:48 +08:00
KingChan b38a329584 Merge pull request '调整转移仓库时的actions' (#313) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-27 14:44:32 +08:00
kingChan 499473c296 add TransferService update actions 2024-06-27 14:43:13 +08:00
KingChan efc99407a8 Merge pull request '调整插入逻辑' (#311) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-27 14:27:06 +08:00
kingChan a384e129c6 update sonar insert_file 2024-06-27 14:26:42 +08:00
KingChan 2d661f2d45 Merge pull request '调整sonar插入文件' (#309) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-27 14:07:53 +08:00
kingChan dfe2f8a7a2 sonar insert_file try cache 2024-06-27 14:06:59 +08:00
kingChan 013a1d6cba update sonar insert_file 2024-06-27 14:04:50 +08:00
yystopf 4d4a98c3b7 更改:创建项目错误返回-1以及项目活跃度排行榜排名改为全局排名 2024-06-27 11:28:39 +08:00
yystopf 8637dfb193 Merge branch 'pre_trustie_server' into trustie_server 2024-06-27 09:16:01 +08:00
yystopf 90d0c8a282 Merge branch 'standalone_develop' into pre_trustie_server 2024-06-27 09:15:37 +08:00
yystopf 26263ba5bb 新增:项目排行榜分页 2024-06-27 09:13:24 +08:00
yystopf a6868e8b12 修复:id为nil报错 2024-06-24 21:00:33 +08:00
yystopf 90f992a1c0 Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2024-06-24 20:54:25 +08:00
yystopf bad7be4266 修复:加入移除排行榜队列延迟五秒 2024-06-24 20:53:49 +08:00
xxq250 7f8aac4d28 release 可不登录下载 2024-06-21 15:47:43 +08:00
xxq250 2c8e285170 release 可不登录下载 2024-06-21 15:46:47 +08:00
xxq250 6d593f786b Merge branch 'pre_trustie_server' into trustie_server 2024-06-21 15:42:58 +08:00
xxq250 b4c5991bc8 Merge branch 'standalone_develop' into pre_trustie_server 2024-06-21 15:42:03 +08:00
xxq250 4318e9acfa fixed releases download不需要权限 2024-06-21 15:41:14 +08:00
xxq250 7767f4b262 定制用户查询接口 2024-06-21 15:40:39 +08:00
KingChan 2ac7a416c7 Merge pull request 'add has_actions' (#307) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-20 14:27:59 +08:00
kingChan ec01552818 add has_actions to projects 2024-06-20 14:10:51 +08:00
KingChan 4146843d71 Merge pull request '调整' (#306) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-20 10:39:31 +08:00
kingChan 32b40487f6 调整soanr启动文件 2024-06-20 10:36:24 +08:00
KingChan 6b1c87a415 Merge pull request '调整文件' (#305) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-20 10:27:33 +08:00
kingChan 939cce2cd3 调整分析文件 2024-06-20 10:24:28 +08:00
KingChan c1173511e0 Merge pull request '删除多余文件' (#304) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-20 10:20:45 +08:00
xxq250 6b73b5383d Merge pull request '合并' (#303) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-20 10:17:45 +08:00
kingChan 33801448fe 删除多余controller 2024-06-20 10:17:33 +08:00
kingChan 36d17d37a4 merge 2024-06-20 10:12:48 +08:00
KingChan 55fac3d6e2 Update list_service.rb 2024-06-14 11:08:48 +08:00
KingChan 68bb149dab Update list_service.rb 2024-06-14 09:43:48 +08:00
kingChan 3dfb616213 双向关联删除 2024-06-13 16:47:15 +08:00
xxq250 93ad4b046b 默认favicon.ico 2024-06-13 16:44:25 +08:00
kingChan 0c509c58ed 调整pm issue link渲染 2024-06-13 11:21:51 +08:00
kingChan 502884810d 调整gitea file 2024-06-13 09:23:24 +08:00
kingChan 89d6a3f48d 调整gitea file 2024-06-13 09:17:59 +08:00
KingChan 30b779d54b Merge pull request 'fix' (#300) from KingChan/forgeplus:standalone_develop into standalone_develop 2024-06-12 17:46:17 +08:00
kingChan d993c1f4e1 调整Glcc PR 页面 2024-06-12 17:43:06 +08:00
KingChan f87268eac0 Merge pull request '调整' (#299) from KingChan/forgeplus:standalone_develop into standalone_develop 2024-06-12 17:40:03 +08:00
kingChan 1d81361c6a 调整Glcc PR 2024-06-12 17:36:24 +08:00
KingChan 14f0320494 Merge pull request '调整Glcc PR页面' (#298) from KingChan/forgeplus:standalone_develop into standalone_develop 2024-06-12 17:34:48 +08:00
kingChan f6f3aa53f9 调整Glcc PR页面 2024-06-12 17:31:17 +08:00
KingChan f8a489a1a8 Merge pull request 'fix Admins::GlccExamineMaterial bug' (#296) from KingChan/forgeplus:standalone_develop into standalone_develop 2024-06-12 17:14:52 +08:00
KingChan 4fc96c477f Merge pull request 'fix bug' (#295) from KingChan/forgeplus:standalone_develop into standalone_develop 2024-06-12 17:11:42 +08:00
kingChan 4eb634c109 fix Admins::GlccExamineMaterial bug 2024-06-12 17:11:28 +08:00
kingChan 025e3f1ac7 fix bug 2024-06-12 17:08:29 +08:00
KingChan 71ae7b3e57 Merge pull request '新增GLCC PR检测全部选择' (#294) from KingChan/forgeplus:standalone_develop into standalone_develop 2024-06-12 17:07:26 +08:00
kingChan 9ca81b06b0 新增GLCC PR检测全部选择 2024-06-12 17:04:17 +08:00
kingChan 105f4401c2 调整判定 2024-06-12 16:14:25 +08:00
kingChan 49b4224a69 修复更新周报报错 2024-06-12 15:12:20 +08:00
kingChan 486156ff92 双向关联 2024-06-12 11:22:20 +08:00
xxq250 59907c371d fixed 私有用户信息接口查询 2024-06-12 11:12:25 +08:00
xxq250 2219dc5b76 fixed 私有用户信息接口查询 2024-06-12 11:08:31 +08:00
kingChan 1a53054e58 add params 2024-06-11 16:37:29 +08:00
kingChan 73b2173a2d fix issues_search 2024-06-11 16:23:54 +08:00
kingChan 3b60fee922 load repo 2024-06-11 16:17:18 +08:00
kingChan b6746d5c49 fix sonar quest error 2024-06-11 16:12:51 +08:00
kingChan 069f165fc5 fix sonar quest 2024-06-11 16:03:22 +08:00
kingChan 2d30ae9914 Merge branch 'pm_project_develop' of https://gitlink.org.cn/Trustie/forgeplus into pm_project_develop 2024-06-11 11:51:44 +08:00
kingChan 1450aec0f5 update change pm_issue_type rule 2024-06-11 11:47:41 +08:00
KingChan 77d01360e6 Merge pull request '调整statics接口' (#293) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-11 11:01:30 +08:00
kingChan f6f8a1ca87 update project pm statistics 2024-06-11 10:58:13 +08:00
KingChan 68d38079fb Merge pull request '调整pm issue 总数计算方式' (#292) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-06-11 10:52:03 +08:00
kingChan ee7916de01 update total issue count rule 2024-06-11 10:48:49 +08:00
xxq250 90928219fb fixed request.referer 跟踪 2024-06-11 10:28:55 +08:00
kingChan 619dce03ca update project details 2024-06-11 10:19:40 +08:00
yystopf f68224ea2b Merge branch 'pre_trustie_server' into trustie_server 2024-06-07 10:41:28 +08:00
yystopf 7df9bfd297 Merge branch 'standalone_develop' into pre_trustie_server 2024-06-07 10:41:16 +08:00
yystopf 43b7dc92b7 Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2024-06-07 10:40:43 +08:00
yystopf 756e308e06 修复:readme 2024-06-07 10:40:36 +08:00
xxq250 4d172eef94 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-06-06 16:34:40 +08:00
xxq250 6cf51901d8 fixed 日统计时间开始时间 2024-06-06 16:34:25 +08:00
kingChan 69568cf626 新增sonar action文件生成 2024-06-06 14:31:28 +08:00
yystopf 5877162714 Merge pull request '项目活跃度算法相关代码' (#291) from dev_project_portrait into standalone_develop 2024-06-06 11:39:57 +08:00
yystopf fdc7c1565e Merge branch 'pre_trustie_server' into trustie_server 2024-06-06 11:39:43 +08:00
yystopf 0c361b0c54 Merge branch 'standalone_develop' into pre_trustie_server 2024-06-06 11:37:46 +08:00
yystopf 7482458135 Merge branch 'standalone_develop' into pre_trustie_server 2024-06-06 11:35:04 +08:00
yystopf ace64f6071 更改:移除 2024-06-06 10:04:30 +08:00
yystopf 814aa55578 Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2024-06-06 10:01:47 +08:00
yystopf 0187851a04 更改:导入失败项目不显示在项目列表 2024-06-06 10:01:41 +08:00
xxq250 9de04dba7e fixed 导入失败的项目标记 project.status=0, 在列表中不显示 2024-06-06 09:45:37 +08:00
yystopf 30a17f53b3 修复:readme报错去重 2024-06-06 08:34:54 +08:00
yystopf 2d113ff02a 更改:fork项目变更项目私有不参与排名 2024-06-05 17:08:53 +08:00
kingChan 4438b11c51 新增接口 measures_component 2024-06-05 16:54:57 +08:00
kingChan 1449064b64 新增接口 2024-06-05 16:22:44 +08:00
yystopf a0b4da4247 修復:detail報錯 2024-06-05 16:01:34 +08:00
yystopf e8348194b7 更改:移除-1提示 2024-06-05 15:48:26 +08:00
yystopf ac815ed9a2 更改:导入项目失败不删除项目永远返回-1 2024-06-05 15:08:06 +08:00
kingChan fc8c31ec66 调整参数 2024-06-05 14:09:28 +08:00
yystopf c53b084538 Merge branch 'standalone_develop' of code.gitlink.org.cn:Trustie/forgeplus into standalone_develop 2024-06-05 11:59:20 +08:00
yystopf 0c4e3a1be7 更改:延迟10s发送websocket消息 2024-06-05 11:59:18 +08:00
xxq250 4a4ffea71c fixed attachment.uuid 2024-06-05 09:38:09 +08:00
xxq250 d6399e26db fixed attachment.uuid 2024-06-05 09:34:35 +08:00
xxq250 395c3fd1fc fixed 项目没有master分支时,创建发行版错误 2024-06-05 08:51:23 +08:00
kingChan c98c7d5ac5 sonar 转发接口 2024-06-04 17:25:08 +08:00
yystopf e09dbfeba5 修复 2024-06-04 17:14:30 +08:00
yystopf 750a032f3f 修复 2024-06-04 17:04:04 +08:00
yystopf 4d0225e0d9 更改:导入失败提示以及更改消息模板422错误 2024-06-04 16:55:06 +08:00
xxq250 f6c5916b97 fixed referer log 2024-06-04 09:36:50 +08:00
xxq250 cfb7f61f0d fixed referer log 2024-06-04 09:33:17 +08:00
yystopf aa739a25b6 更改:回滚+debug 2024-06-03 17:45:34 +08:00
yystopf 626fa8a7b3 修复 2024-06-03 17:18:20 +08:00
xxq250 a05ef8d107 导入失败,请重试 2024-06-03 16:27:21 +08:00
yystopf 1b4ca03ac7 新增:项目开启用户画像使用配置 2024-06-03 14:25:18 +08:00
yystopf 07918dbb04 更改:统计issue数量排除项目管理数据 2024-06-03 13:54:28 +08:00
yystopf be2491cd90 更改:计算取小数点后两位 2024-06-03 13:54:28 +08:00
yystopf 45587ad543 新增:项目活跃度算法及接口 2024-06-03 13:54:28 +08:00
xxq250 73c747397f fixed 竞赛日志 2024-06-03 11:26:14 +08:00
xxq250 6eafc2eb84 fixed 竞赛日志 2024-06-03 11:22:58 +08:00
xxq250 58e17d6a01 fixed 竞赛日志 2024-06-03 11:18:15 +08:00
xxq250 b83982c623 fixed 竞赛用户错误和日志 2024-06-03 11:15:11 +08:00
yystopf c58ca88edd 修复:导入项目相关问题 2024-06-03 10:36:31 +08:00
xxq250 4c82863851 org 容错get_letter_avatar_url 2024-05-31 14:20:50 +08:00
xxq250 e0fc959037 增加流水线节点名称,和标识区分label 2024-05-31 11:04:30 +08:00
xxq250 1573abdde1 增加流水线节点名称,和标识区分 2024-05-31 10:59:38 +08:00
xxq250 b96d52a84d 增加流水线节点名称,和标识区分 2024-05-31 10:56:46 +08:00
xxq250 62de4a0ac8 联调图形设计化-更新文件不转base64 2024-05-31 09:24:39 +08:00
xxq250 cf5b4c1e2d 联调图形设计化-返回log 2024-05-31 08:55:36 +08:00
kingChan 9c84856f99 调整自动更新 无需重启rails s 服务 2024-05-30 17:33:09 +08:00
xxq250 0a80eea1aa Merge remote-tracking branch 'origin/pm_project_develop' into pm_project_develop 2024-05-30 17:31:58 +08:00
xxq250 e393b13ac1 联调图形设计化-返回log 2024-05-30 17:31:47 +08:00
kingChan ff1e85cad5 Merge branch 'sonar_pm' of https://gitlink.org.cn/KingChan/forgeplus into sonar_pm 2024-05-30 15:12:36 +08:00
kingChan 983edca9a3 add sonarqube for projects 2024-05-30 15:10:19 +08:00
KingChan ed4b4062e0 Merge pull request '调整pm issue获取时的逻辑 获取总数' (#290) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-05-30 12:25:14 +08:00
kingChan c590c29f29 调整pm issue获取时的逻辑 获取总数 2024-05-30 12:22:04 +08:00
kingChan 97d1e9466b add sonarqube for projects 2024-05-30 11:50:08 +08:00
KingChan 11d087b381 Merge pull request '调整sonar' (#289) from KingChan/forgeplus:sonar_pm into pm_project_develop 2024-05-29 16:41:29 +08:00
kingChan ad085fcddc add sonarqube 2024-05-29 16:15:07 +08:00
KingChan 56dca30f69 Merge pull request '调整总数' (#287) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-05-29 11:15:10 +08:00
kingChan 61ca57e4e0 update pm issue total_issues_count 2024-05-29 11:11:48 +08:00
xxq250 c87da2947f 联调图形设计化-返回文件sha 2024-05-28 18:04:53 +08:00
xxq250 fe6c821a69 Merge remote-tracking branch 'origin/pm_project_develop' into pm_project_develop 2024-05-28 17:31:12 +08:00
xxq250 541815fb03 联调图形设计化-返回文件sha 2024-05-28 17:31:07 +08:00
yystopf e812f07a14 Merge branch 'standalone_develop' into pm_project_develop 2024-05-28 15:56:33 +08:00
yystopf 572a6de2ad 新增:actions重新运行接口 2024-05-28 15:55:22 +08:00
yystopf c88479a8ec 修复 2024-05-27 11:56:30 +08:00
yystopf 4d3e33a4e8 新增:root_subject参数 2024-05-27 11:51:51 +08:00
xxq250 8325fa7367 联调图形设计化-构建流水线yaml 2024-05-24 15:31:29 +08:00
xxq250 15fc5b84fe Merge remote-tracking branch 'origin/pm_project_develop' into pm_project_develop 2024-05-24 13:53:02 +08:00
xxq250 3b389480f4 构建流水线yaml, base64 2024-05-24 13:52:41 +08:00
KingChan f610d35213 Merge pull request '解决合并问题' (#286) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-05-23 17:59:49 +08:00
kingChan 10b404f750 解决合并问题 2024-05-23 17:56:27 +08:00
kingChan 52aeb9ec07 merge
修复issue删除失败问题
2024-05-23 17:54:46 +08:00
kingChan 907098619b 修复issue删除失败问题 2024-05-23 17:39:42 +08:00
KingChan 5edd492343 Merge pull request '修复pm工作项被删除后 关联项依然还存在的问题' (#283) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-05-23 17:24:07 +08:00
kingChan 0d0f25777a 新增issue 关联 修复pm工作项被删除后 关联项依然还存在的问题 2024-05-23 17:20:30 +08:00
xxq250 a6343d5442 构建流水线yaml, 返回json 2024-05-23 16:40:43 +08:00
xxq250 d2c44ed163 构建流水线yaml, 返回json 2024-05-23 16:26:09 +08:00
xxq250 8c077ef9a8 构建流水线yaml, 返回json 2024-05-23 16:25:20 +08:00
xxq250 411e7535d9 sitemap 2024-05-23 13:47:18 +08:00
xxq250 790a7eeb8c 构建流水线yaml, 中文文件名 2024-05-23 11:26:59 +08:00
xxq250 da831ec6e7 构建流水线yaml 更新文件需要sha 2024-05-23 10:56:35 +08:00
xxq250 8760e46c4b 构建流水线yaml base64 2024-05-23 10:44:48 +08:00
xxq250 15513718f9 构建流水线yaml,保存和更新 log 2024-05-23 09:51:04 +08:00
xxq250 2b7414c2fc 构建流水线yaml,保存和更新 log 2024-05-23 09:23:21 +08:00
xxq250 f55d69d5cf 构建流水线yaml,保存和更新,分支参数 2024-05-23 09:20:48 +08:00
xxq250 4c956e48ae 构建流水线yaml,保存和更新,分支参数 2024-05-22 17:34:18 +08:00
xxq250 08fe69ca37 构建流水线yaml,保存和更新 2024-05-22 17:29:02 +08:00
xxq250 801dbd3f2f 构建流水线yaml,保存和更新 2024-05-22 17:24:15 +08:00
xxq250 87604a1dea 构建流水线json测试 2024-05-22 16:22:43 +08:00
xxq250 329511ac4b 构建流水线json测试 2024-05-22 16:19:56 +08:00
xxq250 6ba2394c16 构建流水线json测试 2024-05-22 16:17:01 +08:00
xxq250 4ad6b265c7 构建流水线json测试 2024-05-22 16:11:21 +08:00
xxq250 47c4d30cf7 构建流水线节点icon 2024-05-22 15:47:44 +08:00
xxq250 b078501460 构建流水线节点icon 2024-05-22 15:10:35 +08:00
xxq250 656c446471 构建流水线,项目开发者权限 2024-05-22 14:45:53 +08:00
xxq250 eb5c2a6b8b 构建流水线 2024-05-22 14:35:22 +08:00
yystopf caa7acc654 新增:开源大赛战队同步保存至gitlink 2024-05-22 11:05:40 +08:00
xxq250 6f25498c29 fixed issues_count统计不包含周报 2024-05-20 08:46:33 +08:00
xxq250 785869d48a fixed 图形化流水线构建细节调整 2024-05-17 15:26:58 +08:00
yystopf 65ad9f6c44 Merge branch 'pre_trustie_server' into trustie_server 2024-05-16 17:25:23 +08:00
yystopf 2724174f9a Merge branch 'standalone_develop' into pre_trustie_server 2024-05-16 17:25:04 +08:00
yystopf c6ae30f2cd 更改:readme特殊处理斜杠 2024-05-16 14:33:14 +08:00
xxq250 ddaa6f7aec fixed 图形化流水线构建 2024-05-16 09:42:48 +08:00
yystopf 35378c3a04 Merge branch 'pre_trustie_server' into trustie_server 2024-05-15 16:22:33 +08:00
yystopf 697f022ab1 Merge branch 'standalone_develop' into pre_trustie_server 2024-05-15 16:22:06 +08:00
yystopf e9587ff322 Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2024-05-15 15:00:25 +08:00
yystopf 4fbf7a52cd 更改:同步记录分支列表取同步时间最新的数据 2024-05-15 15:00:17 +08:00
yystopf 871904fb9c 更改:创建同步不需要验证分支是否存在 2024-05-14 15:01:04 +08:00
yystopf 5559330706 新增:获取github、gitee分支接口 2024-05-14 11:05:00 +08:00
xxq250 ddf754485a Merge branch 'standalone_develop' into pm_project_develop 2024-05-13 09:24:27 +08:00
xxq250 9462e14628 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-05-13 08:54:28 +08:00
xxq250 c5ec05ea77 fixed utf8mb4字符索引处理 2024-05-13 08:54:22 +08:00
yystopf cf6b991027 Merge branch 'pre_trustie_server' into trustie_server 2024-05-11 16:28:19 +08:00
yystopf 6155187550 Merge branch 'standalone_develop' into pre_trustie_server 2024-05-11 16:28:10 +08:00
yystopf 7e654331db 更改:webhook推送action权限访问移除 2024-05-11 16:02:09 +08:00
yystopf 26b00f364f Merge branch 'pre_trustie_server' into trustie_server 2024-05-11 15:03:26 +08:00
yystopf ba2e03287d Merge branch 'standalone_develop' into pre_trustie_server 2024-05-11 15:03:14 +08:00
yystopf 362aee1a35 更改:github webhook特殊处理 2024-05-11 11:43:23 +08:00
yystopf 0414086daa Merge branch 'pre_trustie_server' into trustie_server 2024-05-10 15:12:24 +08:00
yystopf 35f1b840a6 Merge branch 'standalone_develop' into pre_trustie_server 2024-05-10 15:11:51 +08:00
yystopf 28ed60da16 Merge pull request '代码仓库同步部分代码' (#282) from reposync_feature into standalone_develop 2024-05-10 15:05:04 +08:00
yystopf 20e8561815 更改:回调异常处理 2024-05-09 17:32:43 +08:00
yystopf d5c8fe6e56 更改:分支列表排序 2024-05-09 14:13:51 +08:00
yystopf e0b1d6fbb6 新增:历史记录分页 2024-05-09 13:41:46 +08:00
yystopf fd48f00097 修复 2024-05-09 09:16:35 +08:00
yystopf 2a3f2fb620 新增:历史记录分页 2024-05-09 09:11:51 +08:00
xxq250 c63258a519 fork报错日志跟踪 2024-05-08 17:19:55 +08:00
xxq250 e96d4e3d05 Merge remote-tracking branch 'origin/pre_trustie_server' into pre_trustie_server 2024-05-08 17:19:19 +08:00
xxq250 b1b234d6c0 fork报错日志跟踪 2024-05-08 17:19:06 +08:00
xxq250 81b8255a54 fork报错日志跟踪 2024-05-08 17:15:04 +08:00
yystopf d385319764 修复 2024-05-08 11:15:15 +08:00
yystopf a98fe05599 新增:加入同步方向逻辑 2024-05-08 11:13:02 +08:00
yystopf b3a51f2f74 新增:同步历史记录同步状态 2024-05-08 10:34:40 +08:00
yystopf 08a5028006 更改:webhook优化 2024-05-08 09:45:04 +08:00
yystopf ff57561aad 更改:传至reposyncer仓库名称中使用id区分 2024-05-07 15:45:05 +08:00
yystopf f0622b6261 更改:触发webhook新加参数以区别不同来源 2024-05-07 14:54:31 +08:00
xxq250 2f880fe068 流水线节点管理和模板管理,is_required 2024-05-07 14:38:19 +08:00
xxq250 d8dbea60eb Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-05-07 14:08:56 +08:00
xxq250 8ae91ff558 流水线节点管理和模板管理 2024-05-07 14:08:46 +08:00
yystopf ba228a7e93 更改:创建项目默认不开启数据集 2024-05-07 10:07:45 +08:00
yystopf 60857ed357 更改:触发任务判断为失败条件 2024-05-06 17:29:47 +08:00
yystopf 61f893ba0a 更改:解绑操作放在回调里 2024-05-06 13:56:45 +08:00
yystopf 4cacc91130 更改:开始停止同步加一个参数以及webhook触发晚五秒 2024-05-06 10:01:52 +08:00
yystopf ef6d952124 Merge branch 'pre_trustie_server' into trustie_server 2024-04-30 16:28:59 +08:00
yystopf be73306cf8 Merge branch 'standalone_develop' into pre_trustie_server 2024-04-30 16:28:40 +08:00
yystopf a3b31ee67a 修复:区分分支不存在与文件列表为空两种情况的文件列表 2024-04-30 16:13:39 +08:00
yystopf 6683fef667 Merge branch 'pre_trustie_server' into trustie_server 2024-04-30 15:48:14 +08:00
yystopf 289d1e795e Merge branch 'standalone_develop' into pre_trustie_server 2024-04-30 15:47:37 +08:00
xxq250 cb0ecc4194 fixed 多浏览器退出账号时,token不存在处理 2024-04-30 15:35:35 +08:00
yystopf db40a21b04 新增:同步仓库绑定webhook 2024-04-29 15:19:07 +08:00
xxq250 0a2ab5eddc Merge branch 'standalone_develop' into pm_project_develop 2024-04-29 11:11:18 +08:00
xxq250 b236733637 fixed 解散团队中成员在其他组织其他团队不存在的成员需清除组织 2024-04-29 11:11:01 +08:00
xxq250 f0b9765462 fixed 后台项目可查询标识 2024-04-29 09:22:47 +08:00
xxq250 9835f4f84f Merge branch 'standalone_develop' into pm_project_develop
# Conflicts:
#	app/models/attachment.rb
#	app/views/api/v1/attachments/_simple_detail.json.jbuilder
2024-04-29 09:11:08 +08:00
xxq250 5f899d8706 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-04-29 09:07:44 +08:00
xxq250 c591a445f0 fixed 解散团队中成员在其他组织其他团队不存在的成员需清除组织 2024-04-29 09:07:36 +08:00
yystopf 03f1c59391 修复:错误信息和code共同返回 2024-04-26 17:12:50 +08:00
yystopf 1c1cceabbe 修复 2024-04-25 17:04:39 +08:00
yystopf d5f841441b 修复:绑定分支变量名更正以及日志排序 2024-04-25 17:00:01 +08:00
yystopf e556e53f54 新增:同步仓库延迟机制移除 2024-04-25 15:46:19 +08:00
yystopf 5af5219f97 新增:同步仓库延迟机制 2024-04-25 15:41:31 +08:00
yystopf ae4ad29821 修复:group by sync repository 2024-04-25 15:14:00 +08:00
yystopf 31ede9c69d 修复:group by sync repository 2024-04-25 14:45:26 +08:00
yystopf 589d2ae2e8 新增:记录external_token 2024-04-24 17:06:45 +08:00
yystopf a273c1cfcf 新增:同步仓库更新信息接口 2024-04-24 16:11:32 +08:00
yystopf 9c32cd8769 新增:exter_token和inter_token 2024-04-24 15:17:13 +08:00
yystopf 9f8d0e4aac 修复 2024-04-24 13:48:08 +08:00
yystopf af9436622c Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2024-04-24 12:51:42 +08:00
yystopf dd4eab1c9d 新增:创建项目错误返回 2024-04-24 12:41:28 +08:00
xxq250 031ad5fb08 提交日志中创建时间按commit date来 2024-04-24 11:16:59 +08:00
xxq250 6f0993396d 统计优化,月份统计还需要优化 2024-04-24 10:25:35 +08:00
xxq250 8cdacc3210 统计优化,月份统计还需要优化 2024-04-24 10:19:48 +08:00
xxq250 01a38f89a7 统计优化,月份统计还需要优化 2024-04-24 10:09:56 +08:00
xxq250 9a7e9b4237 提交记录表增加日期索引 2024-04-24 08:46:08 +08:00
yystopf e9237d7789 修复 2024-04-23 17:44:56 +08:00
yystopf 81d39588c6 新增:分支列表分支信息以及gitlink admin token 2024-04-23 17:42:26 +08:00
yystopf 946b449d9d 新增:更改同步分支状态首次同步方向 2024-04-22 15:47:20 +08:00
yystopf f28f1a5c55 新增:项目加载排除id=0 2024-04-22 14:55:16 +08:00
xxq250 b744e10dfc Merge branch 'pre_trustie_server' into trustie_server 2024-04-22 08:46:25 +08:00
xxq250 a54aa72f46 Merge branch 'standalone_develop' into pre_trustie_server 2024-04-22 08:45:50 +08:00
xxq250 c58880a4d3 项目列表默认查询时count性能问题处理, not_category_count 2024-04-22 08:44:20 +08:00
yystopf 0f5066f943 新增:分支同步历史记录以及创建同步分支接口 2024-04-19 17:26:20 +08:00
xxq250 b7a400060b Merge branch 'pre_trustie_server' into trustie_server 2024-04-19 17:22:15 +08:00
xxq250 7ab159d7f9 Merge branch 'standalone_develop' into pre_trustie_server 2024-04-19 17:21:35 +08:00
xxq250 643fb163d9 项目列表默认查询时count性能问题处理 2024-04-19 17:21:01 +08:00
xxq250 5fb4a82f2b Merge branch 'pre_trustie_server' into trustie_server 2024-04-19 10:58:00 +08:00
xxq250 1a186547d3 Merge branch 'standalone_develop' into pre_trustie_server 2024-04-19 10:56:46 +08:00
yystopf 240e086232 更改:debug参数回退 2024-04-18 16:31:09 +08:00
yystopf 565c1c1cab 新增:分支列表分支查询以及排序等 2024-04-18 16:14:39 +08:00
yystopf 6f458e0e79 新增:解绑和更改状态接口 2024-04-18 15:20:19 +08:00
xxq250 4dc1c0b7b4 竞赛banner跳转链接 setting中配置 2024-04-18 14:02:14 +08:00
xxq250 4c7963585f 竞赛banner跳转链接 setting中配置 2024-04-18 13:44:42 +08:00
xxq250 edfc540469 竞赛banner跳转链接 setting中配置 2024-04-18 11:19:32 +08:00
yystopf eeb0994961 新增:token鉴权repo地址 2024-04-17 16:37:01 +08:00
yystopf 831d314ebd 新增:返回branch_id保存 2024-04-17 11:15:14 +08:00
xxq250 1554268b17 竞赛banner setting中配置 2024-04-17 11:13:13 +08:00
xxq250 9950273460 竞赛banner setting中配置 2024-04-17 11:12:38 +08:00
xxq250 63db6624e1 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-04-17 11:11:48 +08:00
xxq250 d88b8cbb8a 竞赛banner setting中配置 2024-04-17 11:11:41 +08:00
yystopf 8b1ef7bf15 新增:仓库列表和分支列表 2024-04-17 10:54:23 +08:00
KingChan 804d369de2 Merge pull request 'static files 改为 gh-pages' (#281) from KingChan/forgeplus:chenjing into standalone_develop 2024-04-17 10:23:15 +08:00
呱呱呱 9654cc280e change static_files to gh-pages 2024-04-17 10:19:48 +08:00
KingChan d79f6e2dfa Merge pull request '调整部署方式' (#280) from KingChan/forgeplus:chenjing into standalone_develop 2024-04-17 09:37:14 +08:00
呱呱呱 74d7875552 update scrip 2024-04-17 09:34:07 +08:00
KingChan 2605b6eda8 Merge pull request '更换建站工具名字' (#279) from KingChan/forgeplus:chenjing into standalone_develop 2024-04-17 09:16:45 +08:00
呱呱呱 d37ce50c40 rename page site category name 2024-04-17 09:12:54 +08:00
yystopf 7271603248 新增:同步时间和创建数据返回 2024-04-16 17:53:35 +08:00
yystopf e358e3b6f6 新增:绑定仓库和webhook触发地址 2024-04-16 17:15:22 +08:00
KingChan 91cb0ea036 Merge pull request '调整个人建站模板类型的筛选' (#278) from KingChan/forgeplus:chenjing into standalone_develop 2024-04-16 15:36:09 +08:00
呱呱呱 a1941fb594 update thems 2024-04-16 15:32:36 +08:00
KingChan 05f83bca6c Merge pull request '个人建站调整模型名称' (#277) from KingChan/forgeplus:chenjing into standalone_develop 2024-04-16 15:22:56 +08:00
呱呱呱 d5fb8587ee change public to static_file 2024-04-16 15:18:15 +08:00
KingChan 6d70bc6aa9 Merge pull request '个人建站新增public模式' (#276) from KingChan/forgeplus:chenjing into standalone_develop 2024-04-16 15:09:57 +08:00
呱呱呱 21fb916c90 site page add public build 2024-04-16 15:06:45 +08:00
xxq250 2dafe8c9c9 Merge branch 'pre_trustie_server' into trustie_server 2024-04-16 13:40:53 +08:00
xxq250 8e8226d15b Merge branch 'standalone_develop' into pre_trustie_server 2024-04-16 13:40:13 +08:00
xxq250 3a81c0e859 仓库releases文件下载链接构建,文件后缀路由,直接下载,tag_name 2024-04-16 13:38:56 +08:00
xxq250 810db632d9 Merge branch 'pre_trustie_server' into trustie_server 2024-04-16 10:05:58 +08:00
xxq250 3762515207 Merge branch 'standalone_develop' into pre_trustie_server 2024-04-16 10:04:42 +08:00
xxq250 07a43120f2 仓库releases文件下载链接构建,文件后缀路由,直接下载 2024-04-16 10:02:07 +08:00
xxq250 0dc4ecbfb8 仓库releases文件下载链接构建,文件后缀路由,直接下载 2024-04-16 10:00:44 +08:00
xxq250 5e9621d8d7 仓库releases文件下载链接构建,文件后缀路由 2024-04-16 09:56:35 +08:00
xxq250 d84ebe0f42 仓库releases文件下载链接构建 2024-04-16 09:46:58 +08:00
xxq250 6feb3369c2 仓库releases文件下载链接构建 2024-04-16 09:46:45 +08:00
xxq250 89565acd13 仓库releases文件下载链接构建 2024-04-16 09:41:48 +08:00
yystopf 7ef905c7d6 Merge branch 'pre_trustie_server' into trustie_server 2024-04-15 08:53:06 +08:00
yystopf f9b1aac07e Merge branch 'standalone_develop' into pre_trustie_server 2024-04-15 08:52:18 +08:00
yystopf 04e70b3b34 新增:接口service构建 2024-04-13 21:09:08 +08:00
yystopf ad9345badb 更改:项目列表total_count 2024-04-12 16:26:33 +08:00
xxq250 5a61933857 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-04-12 16:03:40 +08:00
xxq250 1e8dba9050 项目中是否有数据集 2024-04-12 16:03:21 +08:00
yystopf d2d602ab89 新增:根据项目id查询数据集接口 2024-04-12 10:24:05 +08:00
xxq250 b227250020 项目中是否有数据集 2024-04-11 14:12:02 +08:00
xxq250 e861dd059e Merge pull request 'fixed 附件为视频时,点击播放' (#275) from pre_trustie_server into trustie_server 2024-04-10 09:23:30 +08:00
xxq250 957a8f9d85 Merge pull request 'fixed 附件为视频时,点击播放' (#274) from standalone_develop into pre_trustie_server 2024-04-10 09:22:45 +08:00
xxq250 99fd459bd6 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-04-10 09:18:15 +08:00
xxq250 bc58efa397 附件为视频时,点击播放 2024-04-10 09:18:08 +08:00
yystopf 49bcff6277 Merge branch 'pre_trustie_server' into trustie_server 2024-04-08 09:35:01 +08:00
yystopf abed0079d9 Merge branch 'standalone_develop' into pre_trustie_server 2024-04-08 09:34:49 +08:00
yystopf 870b09f5d5 更改:附件描述长度为255 2024-04-08 09:27:12 +08:00
yystopf 0d03ef88b4 更改:附件描述长度为255 2024-04-08 09:26:46 +08:00
yystopf 69e611c427 Merge pull request '数据集相关内容' (#273) from dev_dataset into standalone_develop 2024-04-07 17:26:47 +08:00
yystopf dea9444a56 Merge branch 'pre_trustie_server' into trustie_server 2024-04-07 17:25:40 +08:00
yystopf 493de92920 Merge branch 'standalone_develop' into pre_trustie_server 2024-04-07 17:25:01 +08:00
yystopf 03c9df3f92 更改:访问菜单的权限 2024-04-07 14:38:52 +08:00
yystopf 7440a79cc4 修复:unit不包含dataset正确返回以及字段验证 2024-04-07 14:28:42 +08:00
yystopf 7d560032b0 新增:数据集文件分页 2024-04-03 16:33:07 +08:00
yystopf 8ac9592195 新增:项目详情has_dataset 2024-04-03 15:34:49 +08:00
yystopf c8b37448d5 新增:前端配置文件 2024-04-03 14:51:24 +08:00
yystopf 47c4af8ea1 新增:数据集新字段license_id和paper_content 2024-04-03 10:15:11 +08:00
yystopf dbfbee78fa 新增:数据集部分接口 2024-04-01 17:23:56 +08:00
yystopf 0a13387c1c 新增:项目数据集模型 2024-04-01 15:24:34 +08:00
xxq250 9b0581831f 允许跨域请求白名单IP 2024-04-01 14:01:17 +08:00
xxq250 5519c9c51a 克隆地址不需要限制ip 2024-03-28 09:46:28 +08:00
xxq250 81e916889e 克隆地址不需要限制ip 2024-03-28 09:45:10 +08:00
yystopf 7880ec1779 修复:更新禅道数据脚本 2024-03-28 09:40:15 +08:00
yystopf a0b7cc99a1 Merge branch 'pre_trustie_server' into trustie_server 2024-03-27 17:19:32 +08:00
yystopf 59a6e3121e Merge branch 'standalone_develop' into pre_trustie_server 2024-03-27 17:19:07 +08:00
yystopf d3b552337e 修复 2024-03-27 16:18:31 +08:00
yystopf a1ba0b596a 更改:issue与我相关可自定义用户 2024-03-27 16:04:02 +08:00
yystopf 9fbd0a470e 新增:issue更新时间筛选 2024-03-26 17:31:47 +08:00
xxq250 35cc2cb735 Merge pull request '20240326版本' (#344) from develop into master 2024-03-26 15:18:26 +08:00
xxq250 f4ddc45d6b Merge pull request '20240326版本' (#343) from Trustie/forgeplus:pre_trustie_server into develop 2024-03-26 15:17:25 +08:00
yystopf d7a414aa1f Merge branch 'develop' into standalone_develop 2024-03-26 13:52:34 +08:00
yystopf 2d264bf52b 新增:最新提交加入clone地址 2024-03-26 13:52:21 +08:00
yystopf d8ddde617f 更改:使用uid作为创建用户标识 2024-03-26 13:39:44 +08:00
yystopf d4055bbe75 Merge branch 'develop' into standalone_develop 2024-03-25 11:22:42 +08:00
yystopf 15b8f1e068 更改:编辑issue描述不发消息 2024-03-25 11:22:31 +08:00
yystopf 30ffd95fa5 Merge branch 'pre_trustie_server' into trustie_server 2024-03-22 13:44:44 +08:00
yystopf 51266553f8 Merge branch 'standalone_develop' into pre_trustie_server 2024-03-22 13:44:14 +08:00
yystopf cb125dc85f Merge branch 'develop' into standalone_develop 2024-03-22 08:49:36 +08:00
yystopf b91358a7fe 新增:查询用户需传type值 2024-03-22 08:49:26 +08:00
yystopf 68348f1fc3 更改:csv写入模式 2024-03-21 17:38:57 +08:00
yystopf c999d37f7e 新增:同步acge用户记录在册 2024-03-21 16:58:27 +08:00
yystopf 6e2816af75 新增:同步acge用户并同时创建平台账号 2024-03-21 14:58:35 +08:00
yystopf bf7289032a 更改:private传值问题 2024-03-21 11:25:05 +08:00
yystopf d6acce86a7 更改:marked.min.js文件替换 2024-03-21 10:28:01 +08:00
yystopf 7bdab0bc53 更改:binduser type类型新增acge 2024-03-21 10:16:04 +08:00
yystopf e891d52c32 新增:acge 第三方登录回调地址 2024-03-21 10:11:58 +08:00
yystopf d78bd895d1 Merge branch 'develop' into standalone_develop 2024-03-20 10:48:21 +08:00
yystopf b8b5828a7c 更改:更新项目private参数默认为项目is_public的值 2024-03-20 10:47:36 +08:00
yystopf 721116467b Merge branch 'develop' into standalone_develop 2024-03-20 09:13:38 +08:00
yystopf fd6f904f7e 新增:最近提交列表message搜索 2024-03-20 09:13:29 +08:00
yystopf 444c57c237 更改:marked.min.js文件替换 2024-03-19 10:03:39 +08:00
yystopf 531611c9df Merge branch 'develop' into standalone_develop 2024-03-18 16:31:22 +08:00
yystopf c88d0c2712 新增:最近提交列表返回距离现在时间 2024-03-18 16:31:05 +08:00
xxq250 acb99701a1 site map zone 2024-03-18 14:13:32 +08:00
yystopf 62ff6dd1d7 Merge branch 'develop' into standalone_develop 2024-03-16 16:03:43 +08:00
yystopf a0f1679f03 新增:合并请求合并接口冲突文件提示 2024-03-16 16:03:31 +08:00
xxq250 cc66f99d64 Merge branch 'standalone_develop' into pm_project_develop 2024-03-15 17:08:15 +08:00
yystopf b051213278 Merge branch 'develop' into standalone_develop 2024-03-14 14:15:04 +08:00
yystopf c1fbea8453 修复:删除特殊符号分支、标签失败 2024-03-14 14:14:50 +08:00
yystopf 28dfce0247 Merge branch 'develop' into standalone_develop 2024-03-13 16:11:25 +08:00
yystopf 7d769ad118 更改:readme href替换 2024-03-13 16:10:43 +08:00
yystopf ea29f4c673 Merge branch 'develop' into standalone_develop 2024-03-13 15:12:58 +08:00
yystopf 370a565a7c 新增:readme href匹配 2024-03-13 15:10:05 +08:00
yystopf 597d77ba85 Merge branch 'develop' into standalone_develop 2024-03-12 15:23:12 +08:00
yystopf f3f63e3dd3 新增:里程碑提醒配置化 2024-03-12 15:22:24 +08:00
xxq250 780ba6c103 重新计算组织成员数量 2024-03-11 09:45:13 +08:00
xxq250 d96a33fca4 重新计算组织成员数量 2024-03-11 09:39:18 +08:00
xxq250 41e9f00138 Merge branch 'standalone_develop' into pm_project_develop 2024-03-11 09:23:22 +08:00
xxq250 1e70d93a83 重新计算组织成员数量 2024-03-11 09:22:07 +08:00
yystopf c6152aaca8 Merge branch 'develop' into standalone_develop 2024-03-07 16:00:17 +08:00
yystopf 48c5aa732f 更改:时间取值 2024-03-07 16:00:09 +08:00
yystopf a7b6dbc1a0 Merge branch 'develop' into standalone_develop 2024-03-07 15:49:23 +08:00
yystopf a8997ae160 更改:时间取值 2024-03-07 15:49:14 +08:00
yystopf f422350895 Merge branch 'develop' into standalone_develop 2024-03-07 15:40:50 +08:00
yystopf 69754d5c11 更改:时间取值 2024-03-07 15:40:40 +08:00
yystopf 0f546bc316 Merge branch 'develop' into standalone_develop 2024-03-07 11:19:53 +08:00
yystopf 847e501dee 新增:开启流水线模块接口 2024-03-07 11:18:39 +08:00
yystopf c7bdaa8962 Merge branch 'standalone_develop' into pm_project_develop 2024-03-06 16:44:45 +08:00
yystopf d95fefe589 Merge branch 'develop' into standalone_develop 2024-03-06 16:28:47 +08:00
yystopf 0e31daf9a8 修复:恢复auto_init 2024-03-06 16:27:43 +08:00
xxq250 1ed41b93d8 是否开启百度统计 2024-03-06 15:30:23 +08:00
yystopf 404abe3b2a Merge branch 'develop' into standalone_develop 2024-03-06 10:47:24 +08:00
yystopf dd96e1e2da 修复:流水线文件不存在报错 2024-03-06 10:46:54 +08:00
yystopf d20a7b65c2 fix 2024-03-06 09:02:25 +08:00
yystopf be531eb283 Merge branch 'standalone_develop' into pm_project_develop 2024-03-06 08:56:37 +08:00
yystopf 1894f00a2d Merge branch 'develop' into standalone_develop 2024-03-05 10:26:52 +08:00
yystopf 2d9b97ee78 新增:分页参数 2024-03-05 10:26:36 +08:00
yystopf d2b6f4189a Merge pull request '新版gitea升级同步更改' (#265) from feature_gitea_upgrade into develop 2024-03-05 09:48:28 +08:00
yystopf 5e1c1d8c87 Merge branch 'develop' into standalone_develop 2024-03-05 09:47:48 +08:00
yystopf 8eefb8ca07 新增:流水线接口代码 2024-03-05 09:43:34 +08:00
yystopf f35dddbbf7 fix 2024-03-01 17:36:58 +08:00
yystopf 59e8ce206f merge from develop 2024-03-01 16:58:29 +08:00
xxq250 5aab575b36 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-03-01 15:17:26 +08:00
xxq250 6e41605cbc fixed 删除文件失败,参数sha不匹配提示 2024-03-01 15:17:20 +08:00
yystopf 8760a8234f 更改:获取专区文章使用简要信息接口 2024-03-01 10:36:57 +08:00
yystopf 13e58392dc 修复:脚本中status找不到的情况 2024-02-19 11:14:07 +08:00
yystopf a247ac0d3a 修复 2024-02-03 17:18:01 +08:00
yystopf 4e05be3176 修复 2024-02-03 17:14:51 +08:00
yystopf c5af356f34 Merge branch 'pm_project_develop' of https://gitlink.org.cn/Trustie/forgeplus into pm_project_develop 2024-02-03 17:12:42 +08:00
yystopf 4ca1e2e85a 新增:禅道数据导入任务脚本 2024-02-03 17:12:33 +08:00
KingChan 3934b1b8a4 Merge pull request '新增饼图默认值' (#272) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-02-03 15:02:29 +08:00
kingchan 6694ed625f update pie char default 2024-02-03 14:59:43 +08:00
yystopf 7f6c6383bc 更改:禅道脚本中数据为空处理 2024-02-03 14:47:59 +08:00
KingChan 8bdad1d1c0 Merge pull request '修复接口数据固定问题' (#271) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-02-02 11:43:29 +08:00
kingchan 9b5fdb5134 fix bug for pm project 2024-02-02 11:40:53 +08:00
xxq250 ecd1cea4e1 Merge remote-tracking branch 'origin/pm_project_develop' into pm_project_develop 2024-02-02 11:20:40 +08:00
xxq250 08e17454d5 fixed issues_count统计增加已分配类型,单独汇总,区分状态 2024-02-02 11:20:33 +08:00
KingChan 92de5dd69d Merge pull request '调整srtring 为数字' (#270) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-02-01 11:51:16 +08:00
呱呱呱 0d815db283 update 2024-02-01 11:48:50 +08:00
yystopf 447429a663 新增:创建项目auto_init参数 2024-01-31 16:47:00 +08:00
xxq250 94b7129257 fixed issues_count统计增加已分配类型,单独汇总 2024-01-31 15:37:09 +08:00
yystopf d0bc8e4378 Merge branch 'develop' of https://gitlink.org.cn/Trustie/forgeplus into develop 2024-01-31 15:36:21 +08:00
xxq250 c88c64b33b Merge branch 'pm_project_develop' of https://gitlink.org.cn/Trustie/forgeplus into pm_project_develop 2024-01-31 15:13:07 +08:00
xxq250 d477d2cabb fixed issues_count统计增加已分配类型 2024-01-31 15:12:55 +08:00
KingChan 725226e930 Merge pull request '修复bug check_pm_and_update_due_date' (#269) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-31 10:24:40 +08:00
呱呱呱 f3dd40515a fix bug check_pm_and_update_due_date 2024-01-31 10:21:31 +08:00
KingChan 5fa1edb434 Merge pull request '调整check_pm_and_update_due_date' (#268) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-31 09:21:49 +08:00
呱呱呱 9e90b2cef3 update check_pm_and_update_due_date for issue 2024-01-31 09:19:20 +08:00
KingChan 413b90199d Merge pull request '新增 pm issue 变更为关闭时,结束时间为空则自动添加结束时间' (#267) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-31 09:11:50 +08:00
呱呱呱 65d2387931 update 2024-01-31 09:08:38 +08:00
呱呱呱 9b9374c99b add due_date to pm issue batch params 2024-01-31 08:43:10 +08:00
KingChan 34d00a9c6d Merge pull request '调整折线图数据' (#266) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-30 17:14:48 +08:00
呱呱呱 b456bf99ca update plyline 2024-01-30 17:10:32 +08:00
yystopf 6a4f63d8ea 新增:最新提交列表接口 2024-01-30 14:50:59 +08:00
yystopf feec49d4bd 新增: 查询删除分支与普通分支 2024-01-30 14:50:59 +08:00
yystopf a644a65493 更新:gitea client版本 2024-01-30 14:50:59 +08:00
yystopf d8eeb8f1b7 新增:恢复分支接口
新增:删除者信息
2024-01-30 14:50:59 +08:00
yystopf c94bffd844 更改:重置gitea token规则 2024-01-30 14:50:59 +08:00
yystopf 096941ea9e 更改:重置gitea token规则 2024-01-30 14:50:59 +08:00
yystopf 026d58c347 更改:compare接口 2024-01-30 14:50:59 +08:00
yystopf a0265d4808 更改:tree返回结构体适配以及生成token需新增scopes参数 2024-01-30 14:50:59 +08:00
KingChan ee1b0556ad Merge pull request '调整pm饼图返回值' (#264) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-30 14:32:56 +08:00
呱呱呱 a5a22f6889 add default pm project statistics 2024-01-30 14:29:37 +08:00
KingChan eb00419eb4 Merge pull request '修复 pm project statistics 问题' (#263) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-30 14:23:25 +08:00
呱呱呱 9538767167 update pm project statistics 2024-01-30 14:20:16 +08:00
KingChan 932fa04a45 Merge pull request '增加默认返回值' (#262) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-30 14:06:57 +08:00
呱呱呱 7d8e0d018e add default for project polyline 2024-01-30 14:03:34 +08:00
KingChan 69b9ae0cb0 Merge pull request 'pm 项目统计新增 open data 返回结果' (#261) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-30 11:44:05 +08:00
呱呱呱 53083d3030 add open data for pm project statistics 2024-01-30 11:40:56 +08:00
KingChan fc007d8f0b Merge pull request '调整返回值' (#260) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-30 11:18:29 +08:00
呱呱呱 f39b83692b update 2024-01-30 11:16:06 +08:00
KingChan 0c148b0fad Merge pull request '修复bug' (#259) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-30 11:14:15 +08:00
呱呱呱 3094c81d2c fix bug 2024-01-30 11:07:01 +08:00
KingChan 0e72e11275 Merge pull request '修复数据问题,新增开启中的工作项数量返回' (#258) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-30 11:00:06 +08:00
呱呱呱 3505d29410 fix 2024-01-30 10:56:46 +08:00
xxq250 8ca9ced360 fixed 组织成员数取组织内成员和组织所有仓库成员组合,排序加入时间 2024-01-30 08:27:49 +08:00
xxq250 036acfc43d fixed 组织成员数取组织内成员和组织所有仓库成员组合,加入时间 2024-01-29 17:35:08 +08:00
xxq250 627332e93a fixed 组织成员数取组织内成员和组织所有仓库成员组合,加入时间 2024-01-29 17:32:46 +08:00
xxq250 c957617263 fixed 取消仓库增加成员时同时加进组织操作,仅增加 2024-01-29 16:54:52 +08:00
xxq250 6ff89d7929 fixed 取消仓库增加成员时同时加进组织操作 2024-01-29 16:05:22 +08:00
xxq250 d2663eb7b7 fixed 组织成员数取组织内成员和组织所有仓库成员组合 2024-01-29 16:05:04 +08:00
yystopf 0e8a3ddb79 Merge branch 'develop' into standalone_develop 2024-01-27 14:53:12 +08:00
yystopf f61393f34a Merge branch 'develop' of https://gitlink.org.cn/yystopf/forgeplus into develop 2024-01-27 14:52:52 +08:00
yystopf df0ef313f6 更改:仓库无文件跳转404 2024-01-26 16:15:14 +08:00
xxq250 b6b81b6092 Merge remote-tracking branch 'origin/pm_project_develop' into pm_project_develop 2024-01-26 15:39:39 +08:00
xxq250 28de064841 issues_count增加我负责的统计 2024-01-26 15:38:32 +08:00
xxq250 768764a814 sitemap.txt 2024-01-26 14:58:33 +08:00
KingChan ea0bdd83d0 Merge pull request '调整燃烬图系数' (#257) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-25 17:16:30 +08:00
呱呱呱 efef195c27 update burndown_charts base_number -1 2024-01-25 17:13:57 +08:00
KingChan 0ce1b5fd9c Merge pull request '调整燃烬图的数字类型' (#256) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-25 17:13:16 +08:00
呱呱呱 45e8b4d832 update burndown_charts base_number 2024-01-25 17:10:43 +08:00
yystopf 1f07833de9 Merge pull request '里程碑过期相关系统通知' (#255) from yystopf/forgeplus:develop into develop 2024-01-25 16:12:57 +08:00
yystopf dbf41c04b3 Merge branch 'develop' into standalone_develop 2024-01-25 16:11:58 +08:00
yystopf 604e3eeba1 Merge branch 'develop' of https://gitlink.org.cn/Trustie/forgeplus into develop 2024-01-25 16:11:45 +08:00
yystopf 299978833d 新增:里程碑过期相关系统通知 2024-01-25 16:09:52 +08:00
xxq250 088bb3d1ac pm中多项目id查询issue 2024-01-25 15:49:03 +08:00
xxq250 3986b86852 pm中多项目id查询issue 2024-01-25 15:44:55 +08:00
KingChan b33c4bf78b Merge pull request '调整请求路由' (#254) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-25 14:30:26 +08:00
呱呱呱 0d250e0d4e update routes 2024-01-25 14:28:00 +08:00
KingChan 5649f5b67a Merge pull request '新增获取饼图 折线图数据接口' (#253) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-25 14:08:33 +08:00
呱呱呱 406da81ccf add project statistics and project polyline 2024-01-25 14:04:36 +08:00
KingChan 5a0c7cddcf Merge pull request '调整燃烬图' (#252) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-25 09:04:04 +08:00
呱呱呱 27b81a5479 update burndown_charts 2024-01-25 09:01:35 +08:00
kingchan dbdebc6232 update 2024-01-24 16:55:10 +08:00
xxq250 d106ac9763 上周统计一直显示 2024-01-24 15:38:21 +08:00
KingChan 4889eb8554 Merge pull request '调整燃烬图返回值' (#251) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-23 17:26:23 +08:00
呱呱呱 f85f9fe4f4 update burndown_charts response 2024-01-23 17:22:58 +08:00
KingChan c9b6484b66 Merge pull request '燃烬图接口' (#250) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-23 17:18:18 +08:00
呱呱呱 191153a39e add burndown_charts 2024-01-23 17:08:06 +08:00
KingChan 07a563f769 Merge pull request '新增 typoe 工时解析' (#249) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2024-01-23 11:21:36 +08:00
呱呱呱 ea6295c888 update pm statistics hour 2024-01-23 11:19:00 +08:00
xxq250 7a57108ca5 Merge branch 'pre_trustie_server' into trustie_server 2024-01-22 13:03:54 +08:00
xxq250 99e0d8b128 Merge branch 'standalone_develop' into pre_trustie_server 2024-01-22 13:03:18 +08:00
xxq250 90ea1804e9 后台概览增加缓存,增加上周统计数据,百分号 2024-01-22 13:02:48 +08:00
xxq250 c562d5a102 Merge branch 'pre_trustie_server' into trustie_server 2024-01-22 12:58:34 +08:00
xxq250 24e4020809 Merge branch 'standalone_develop' into pre_trustie_server 2024-01-22 12:57:48 +08:00
xxq250 f98c044715 后台概览增加缓存,增加上周统计数据 2024-01-22 12:57:04 +08:00
xxq250 9ef255f3b6 接入百度统计部分数据,缓存总数据 2024-01-22 12:07:46 +08:00
xxq250 e4faee134a 接入百度统计部分数据,按天存储,refresh_access_token 2024-01-22 11:39:16 +08:00
xxq250 1fd4196751 sitemap.txt 2024-01-20 12:09:37 +08:00
xxq250 89e755a590 dashboards 总数据统计缓存1天 2024-01-19 14:51:05 +08:00
yystopf ec2f7d8c03 Merge branch 'pre_trustie_server' into trustie_server 2024-01-18 09:59:05 +08:00
yystopf 302e501610 Merge branch 'standalone_develop' into pre_trustie_server 2024-01-18 09:58:49 +08:00
yystopf 354242a290 修复 2024-01-18 09:58:30 +08:00
yystopf 7d6e09c696 Merge branch 'pre_trustie_server' into trustie_server 2024-01-17 17:53:48 +08:00
yystopf db0b47c39e Merge branch 'standalone_develop' into pre_trustie_server 2024-01-17 17:53:25 +08:00
yystopf f468f0cf67 更改:统计issue数量不应该统计pr关联的issue数量 2024-01-17 17:39:51 +08:00
yystopf 4453975b54 Merge branch 'standalone_develop' into pre_trustie_server 2024-01-17 16:38:24 +08:00
yystopf 65abdda8f9 更改:文案修改 2024-01-17 16:37:55 +08:00
yystopf 2ebd8c44f5 Merge branch 'pre_trustie_server' into trustie_server 2024-01-17 16:29:44 +08:00
yystopf 817b607a54 Merge branch 'standalone_develop' into pre_trustie_server 2024-01-17 16:28:41 +08:00
yystopf 6d2ae4dcf1 Merge branch 'pre_trustie_server' of https://gitlink.org.cn/Trustie/forgeplus into pre_trustie_server 2024-01-17 16:28:20 +08:00
KingChan 3c33ef7709 Merge pull request '拒绝实名认证需要实名理由' (#248) from KingChan/forgeplus:chenjing into standalone_develop 2024-01-17 15:36:58 +08:00
呱呱呱 afe4a66c2b update identity_verifications_controller update 2024-01-17 15:34:08 +08:00
KingChan d6229b62bf Merge pull request '修改文字' (#247) from KingChan/forgeplus:chenjing into standalone_develop 2024-01-17 15:20:12 +08:00
呱呱呱 539bf58e0d update identity_verifications/edit 2024-01-17 15:17:47 +08:00
yystopf ed81ce5927 更改:活跃度查询时间区间 2024-01-16 16:27:18 +08:00
xxq250 5a5a602ce5 sitemap.xml 2024-01-16 15:52:03 +08:00
yystopf 1c8811fda6 新增:项目疑修排行榜 2024-01-16 10:19:02 +08:00
xxq250 4498369064 google提交sitemap认证 2024-01-15 16:50:54 +08:00
yystopf 7d813c0ebe 新增:项目缓存加入关闭issue数量 2024-01-15 16:41:54 +08:00
xxq250 109ef3fe1c fixed 版本发布uuid 变化 2024-01-15 15:52:20 +08:00
xxq250 38f711f4ae sitemap.txt 2024-01-15 15:17:57 +08:00
yystopf ccdacb641f 新增:导入禅道需求数据脚本 2024-01-15 14:53:29 +08:00
xxq250 3333e8c779 接入百度统计部分数据,按天存储,refresh_access_token 2024-01-15 11:31:06 +08:00
xxq250 fd62ffdee2 Merge branch 'pre_trustie_server' into trustie_server 2024-01-15 11:28:49 +08:00
xxq250 6ca883aedd Merge branch 'standalone_develop' into pre_trustie_server 2024-01-15 11:27:41 +08:00
xxq250 e2374676c3 接入百度统计部分数据,按天存储 2024-01-15 11:23:59 +08:00
yystopf d55ff07296 新增:排除组织项目ID参数 2024-01-15 10:59:01 +08:00
yystopf f893ce41d0 新增:排除组织项目ID参数 2024-01-15 10:52:30 +08:00
yystopf ebdfbbf420 新增:导入禅道数据脚本 2024-01-13 14:31:35 +08:00
yystopf 8edc150800 新增:项目信息返回name 2024-01-13 08:26:15 +08:00
yystopf f9ce2a8b26 新增:项目标记创建时不能为空 2024-01-12 16:39:35 +08:00
xxq250 72b3279e8b Merge remote-tracking branch 'origin/trustie_server' into trustie_server 2024-01-11 14:20:17 +08:00
xxq250 3a85d1d736 附件表uuid增加索引 2024-01-11 14:19:46 +08:00
xxq250 1e159ec1cf 附件表uuid增加索引 2024-01-11 14:18:53 +08:00
xxq250 bf3f25972e Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2024-01-11 14:15:29 +08:00
xxq250 6756687c07 附件表uuid增加索引 2024-01-11 14:14:56 +08:00
yystopf c89c394374 Merge branch 'develop' into standalone_develop 2024-01-11 13:40:04 +08:00
yystopf 35e6d945dd 更改:组织标识正则 2024-01-11 13:39:13 +08:00
KingChan 3ceefc33f8 Merge pull request '新增身份认证操作日志功能' (#246) from KingChan/forgeplus:chenjing into standalone_develop 2024-01-10 15:00:19 +08:00
呱呱呱 f2b732b8e7 add log for identity_verifications 2024-01-10 14:58:02 +08:00
yystopf 05aeecf67a 新增:项目标记关联组织初始化 2024-01-10 14:03:08 +08:00
KingChan 515bf4663d Merge pull request '新增关闭站点时必须填写理由' (#245) from KingChan/forgeplus:chenjing into standalone_develop 2024-01-10 10:23:30 +08:00
呱呱呱 1cd25c188c add page site close description rule 2024-01-10 10:19:45 +08:00
yystopf 5fafd8195c 新增:项目标记关联组织接口 2024-01-04 14:25:40 +08:00
yystopf 9d45ea07c8 Merge branch 'trustie_server' of https://gitlink.org.cn/Trustie/forgeplus into trustie_server 2023-12-22 14:00:51 +08:00
yystopf beb96c5526 Merge branch 'pre_trustie_server' into trustie_server 2023-12-22 14:00:36 +08:00
yystopf 2562329a5e Merge branch 'standalone_develop' into pre_trustie_server 2023-12-22 13:47:39 +08:00
yystopf d79213d14f 新增:issue列表column无值查询 2023-12-22 08:42:57 +08:00
KingChan 2f68da74cb Merge pull request '增加page删除后的回调' (#244) from KingChan/forgeplus:standalone_develop into standalone_develop 2023-12-21 15:10:13 +08:00
呱呱呱 5aff334054 add page destroy callback 2023-12-21 15:07:56 +08:00
KingChan 3d0fd28c2a Merge pull request '调整删除建站时的部署指令' (#243) from KingChan/forgeplus:standalone_develop into standalone_develop 2023-12-21 14:39:10 +08:00
呱呱呱 9f60518e3e update page service 2023-12-21 14:35:07 +08:00
KingChan e25f27e488 Merge pull request '调整page返回值' (#242) from KingChan/forgeplus:standalone_develop into standalone_develop 2023-12-21 14:17:44 +08:00
呱呱呱 3a0a95a18f update model page url 2023-12-21 14:13:42 +08:00
KingChan f3376594f1 Merge pull request '仓库新增web_site参数 page服务专用' (#241) from KingChan/forgeplus:chenjing into standalone_develop 2023-12-20 10:45:15 +08:00
呱呱呱 69c4d461a4 update reposit detail 2023-12-20 10:41:39 +08:00
yystopf 3fefc0d7c6 新增:删除项目须同时删除所有的统计数据 2023-12-20 09:58:03 +08:00
yystopf 93ab86e363 Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2023-12-20 09:52:02 +08:00
yystopf 3f621bd5b5 更改:项目活跃度排行默认统计一周内的数据 2023-12-20 09:51:51 +08:00
yystopf ae8b86ef02 更改:后台管理模块文案 2023-12-20 09:43:57 +08:00
KingChan 1195a7a339 Merge pull request '调整建站服务功能' (#240) from KingChan/forgeplus:chenjing into standalone_develop 2023-12-20 09:38:40 +08:00
呱呱呱 d590e1165e website update 2023-12-20 09:22:10 +08:00
yystopf 6b8749589e 更改:文案为截止日期 2023-12-19 15:45:35 +08:00
yystopf 883542dfe8 Merge pull request '项目名称显示不全' (#239) from gitlink_admin_feature into standalone_develop 2023-12-19 15:39:48 +08:00
yystopf 3b5b78faed 更改:删除数据处理以及昵称获取规则处理 2023-12-19 15:36:57 +08:00
yystopf 1d48af015e Merge pull request '后台管理更新' (#238) from gitlink_admin_feature into standalone_develop 2023-12-19 15:26:05 +08:00
yystopf 26461f3a44 更改:防止sql注入 2023-12-19 15:05:00 +08:00
yystopf 21f559f254 更改:项目排行榜使用数据存储以及数据导出的功能 2023-12-19 14:57:54 +08:00
yystopf 016a2f8cf5 更改:后台管理sidebar 2023-12-18 16:04:14 +08:00
yystopf 75fff13550 更改:项目排行榜查询丰富 2023-12-18 15:49:41 +08:00
xxq250 2c5b9649aa Merge branch 'pre_trustie_server' into trustie_server 2023-12-18 13:45:05 +08:00
xxq250 c8217d8596 Merge branch 'standalone_develop' into pre_trustie_server 2023-12-18 13:44:15 +08:00
xxq250 761021d191 Github issues迁移,更新时间固定 2023-12-18 11:52:37 +08:00
xxq250 326dcc56ab Github issues迁移,更新时间固定 2023-12-18 11:19:20 +08:00
xxq250 3806ddaa17 Github issues迁移,标记 2023-12-18 10:59:24 +08:00
xxq250 5fe9719cc9 Github issues迁移,标记 2023-12-18 10:54:47 +08:00
xxq250 c6a38c06d0 Github issues迁移,标记 2023-12-18 10:54:04 +08:00
xxq250 eaf389ecea Github issues迁移,title 长度处理 2023-12-18 10:33:31 +08:00
xxq250 7b1d0e21ee Github issues迁移,title 长度处理 2023-12-18 10:00:01 +08:00
xxq250 9979ae6d3a Github issues迁移,title 长度处理 2023-12-18 09:49:53 +08:00
xxq250 b80ed537fc Github issues迁移,用户名处理, 限流需要请求等待,token 2023-12-15 17:04:53 +08:00
xxq250 de393148d9 Github issues迁移,用户名处理, 限流需要请求等待,token 2023-12-15 16:48:33 +08:00
xxq250 b7597c3fa7 Github issues迁移,用户名处理, 限流需要请求等待,token 2023-12-15 16:47:22 +08:00
xxq250 505d873ea6 Github issues迁移,用户名处理, 限流需要请求等待 2023-12-15 15:59:27 +08:00
xxq250 1eb18e4036 Github issues迁移,用户名处理 2023-12-15 15:47:41 +08:00
xxq250 0b21d4af41 Github issues迁移 2023-12-15 15:36:31 +08:00
yystopf 1ecd7f26b6 Merge branch 'pre_trustie_server' into trustie_server 2023-12-15 10:49:54 +08:00
xxq250 7d1b4da72c Merge branch 'standalone_develop' into pm_project_develop
# Conflicts:
#	app/controllers/attachments_controller.rb
#	app/services/api/v1/issues/concerns/checkable.rb
#	app/services/api/v1/issues/concerns/loadable.rb
2023-12-15 10:43:54 +08:00
xxq250 d4b46dbf97 Merge branch 'standalone_develop' into pre_trustie_server
# Conflicts:
#	app/controllers/api/v1/issues_controller.rb
#	app/models/identity_verification.rb
#	app/models/issue.rb
#	app/models/journal.rb
#	app/services/api/v1/issues/list_service.rb
2023-12-15 10:40:58 +08:00
yystopf d98ad8a3f4 Merge branch 'develop' into standalone_develop 2023-12-15 09:42:30 +08:00
yystopf ad96991730 更改:提示语逗号为中文逗号 2023-12-15 09:01:11 +08:00
xxq250 03283813c2 fixed 用户搜索按昵称和登录时间倒排序 2023-12-14 16:50:13 +08:00
xxq250 4b57e96914 fixed 用户搜索按昵称和登录时间倒排序 2023-12-14 16:49:44 +08:00
yystopf e78f7ab9dd Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop 2023-12-14 16:45:49 +08:00
xxq250 835f2db759 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2023-12-14 16:45:36 +08:00
yystopf ac601b4b22 Merge branch 'develop' into standalone_develop 2023-12-14 16:45:32 +08:00
xxq250 c972d538ee fixed 用户搜索按昵称和登录时间倒排序 2023-12-14 16:45:29 +08:00
yystopf c75953d343 新增:创建分支已存在分支提示 2023-12-14 16:45:02 +08:00
yystopf a2ca6bd91b Merge branch 'develop' into standalone_develop 2023-12-14 11:47:48 +08:00
yystopf 129970a525 更改:提示语 2023-12-14 11:47:32 +08:00
yystopf 8be254710e Merge branch 'develop' into standalone_develop 2023-12-14 11:44:18 +08:00
yystopf 062e654d45 新增:更改密码须验证两次密码 2023-12-14 11:43:42 +08:00
xxq250 095c83d2d0 Merge pull request '20231213版本' (#342) from Trustie/forgeplus:trustie_server into master 2023-12-13 15:01:17 +08:00
yystopf 39aa02ff57 新增:关键词搜索以及排序 2023-12-13 11:05:16 +08:00
xxq250 b29e500645 fixed 解决安全问题访问附件,id改为uuid,id查询修改 2023-12-13 09:26:49 +08:00
xxq250 60c8b25075 fixed 解决安全问题访问附件,id改为uuid,查看附件 2023-12-12 16:57:39 +08:00
xxq250 247c5a60b1 fixed 解决安全问题访问附件,id改为uuid,关联pages功能修改 2023-12-12 16:47:48 +08:00
xxq250 de1266ba6c fixed 解决安全问题访问附件,id改为uuid,关联功能修改 2023-12-12 16:41:02 +08:00
xxq250 9a0809e45b fixed 发行版附件关联 2023-12-12 15:33:48 +08:00
xxq250 637fcca509 Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2023-12-12 15:21:02 +08:00
xxq250 8264717017 fixed 解决安全问题访问附件,id改为uuid,migrate 2023-12-12 15:20:52 +08:00
yystopf a423576ffc Merge branch 'develop' into standalone_develop 2023-12-12 15:03:47 +08:00
yystopf 852d430178 更改:获取标签详情特殊符号处理 2023-12-12 15:02:03 +08:00
xxq250 d74901cffa fixed 解决安全问题访问附件,id改为uuid 2023-12-12 14:31:21 +08:00
yystopf 008d9dda3e 新增:父工作项列表查询类型 2023-12-12 11:23:38 +08:00
yystopf 947117ac5f 新增:父子关系判断以及可设置为父工作项的列表 2023-12-12 09:47:54 +08:00
yystopf 0cb38bce4f 新增:根据id查询疑修 2023-12-11 16:07:24 +08:00
yystopf aac91538aa Merge branch 'develop' into standalone_develop 2023-12-11 09:18:00 +08:00
yystopf 9ac061f2a9 更改:gemfile 2023-12-11 09:17:43 +08:00
yystopf 60359333f8 Merge branch 'develop' into standalone_develop 2023-12-11 09:15:29 +08:00
yystopf b2250db79a 新增:查看标签详情api 2023-12-11 09:14:47 +08:00
xxq250 03277d2ad7 commit_log_to_db.rake trustie all 2023-12-09 12:23:17 +08:00
xxq250 c2a4e62131 commit_log_to_db.rake trustie all 2023-12-09 12:21:37 +08:00
xxq250 f81b3a0b35 commit_log_to_db.rake trustie 2023-12-09 09:40:03 +08:00
yystopf 48a446662f 新增:print issues status_ids 字段查询 2023-12-07 15:37:02 +08:00
yystopf f9753c948e 更改:附件返回绝对地址 2023-12-07 14:45:31 +08:00
yystopf 648d4189a2 修复:permit query parms 2023-12-07 14:05:33 +08:00
yystopf 09942caa3b 新增:print issues pm_issue_types字段查询 2023-12-07 13:58:41 +08:00
yystopf 6bd2bb7024 修复 2023-12-06 13:59:28 +08:00
yystopf 5fec6b3942 更改:去掉多余数据使用删除 2023-12-06 13:50:20 +08:00
yystopf b15bddea49 修复:排序字段失效 2023-12-06 09:30:49 +08:00
yystopf 67ce9af382 新增: issue列表的pm_issue_types查询 2023-12-05 14:49:21 +08:00
yystopf 50986035e2 新增: issue列表的pm_issue_types查询 2023-12-05 14:46:59 +08:00
yystopf b08c1763ac Merge pull request 'issue列表新增优先级查询' (#236) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-12-04 15:49:16 +08:00
yystopf 63638d4b2e 新增:issue列表新增优先级查询 2023-12-04 15:46:34 +08:00
xxq250 b13f1a681e issue按id集合查询,选择关联issue时排除已选id集合 2023-12-04 10:41:19 +08:00
xxq250 1bdb6dad98 issue按id集合查询,选择关联issue时排除已选id集合 2023-12-04 09:59:25 +08:00
xxq250 fea7c52227 issue按id集合查询,选择关联issue时排除已选id集合 2023-12-04 09:49:59 +08:00
yystopf 98770ca47e 新增:代码溯源注册后须重新调用登录接口 2023-12-01 17:04:34 +08:00
xxq250 6fb22d3117 Merge branch 'pre_trustie_server' into trustie_server 2023-12-01 14:59:47 +08:00
xxq250 d0623e4d57 rake copy attachemnt 2023-12-01 14:59:44 +08:00
yystopf c63c0cc636 更改:issue status查询不使用where.not方式 2023-12-01 14:59:13 +08:00
xxq250 32f03abe84 合并开发分支代码 2023-12-01 14:57:01 +08:00
xxq250 24b5c4e672 合并开发分支代码 2023-12-01 14:53:48 +08:00
yystopf 65590bd33e 修复: issues查询使用distinct去重 2023-12-01 10:42:16 +08:00
yystopf d2402c4103 修复 2023-12-01 10:21:40 +08:00
yystopf 1bbf53279b Merge branch 'standalone_develop' into pm_project_develop 2023-12-01 10:00:38 +08:00
KingChan f9427f17a3 Merge pull request '调整默认排序' (#235) from KingChan/forgeplus:standalone_develop into standalone_develop 2023-12-01 09:54:45 +08:00
kingchan d797676639 change created on to updated_on for issue list service 2023-12-01 09:52:32 +08:00
yystopf 21640fe5e6 更改:issue status和priority初始化数据 2023-12-01 09:48:08 +08:00
yystopf c97d5f9fdf Merge pull request '已完成/已关闭统计更改' (#234) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-12-01 09:22:37 +08:00
yystopf 93514e8a73 更改:统计工作项容量以及预估工时 2023-12-01 09:19:08 +08:00
KingChan ba196794a8 Merge pull request '调整 issue 的 order' (#233) from KingChan/forgeplus:standalone_develop into standalone_develop 2023-11-29 15:15:00 +08:00
呱呱呱 3833816a0a update issue order by 2023-11-29 15:11:41 +08:00
yystopf fe4f56dd36 新增:批量更新迭代中工作项 2023-11-29 14:28:31 +08:00
yystopf 9c4bc3f37c 更改:未关联工作项需包含外键为0的数据 2023-11-24 09:42:25 +08:00
yystopf 0adff52355 Merge pull request 'child_count使用count_cache' (#232) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-11-23 08:55:20 +08:00
yystopf 1a067d0607 更改:child_count使用count_cache 2023-11-23 08:53:02 +08:00
yystopf bd5f4057f6 Merge pull request '工作项统计类别统计' (#231) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-11-22 15:38:07 +08:00
yystopf f8a6dcb3eb 新增:工作项统计类别统计 2023-11-22 15:36:05 +08:00
yystopf fe137443f8 Merge pull request '丰富数据和移除数据' (#230) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-11-22 14:49:46 +08:00
yystopf c09c167bdd 更改:移除数据和丰富颜色数据 2023-11-22 14:47:04 +08:00
xxq250 778f9563f3 fixed 解决安全问题访问附件id改为uuid,统一处理,issue不单独处理 2023-11-22 11:38:34 +08:00
xxq250 168f5bf7d1 fixed 解决安全问题访问附件,id改为uuid,issue关联附件 2023-11-22 11:34:48 +08:00
xxq250 9526d1b896 fixed 解决安全问题访问附件,id改为uuid,检测附件 2023-11-22 11:28:35 +08:00
xxq250 d26dcb5b9a fixed 解决安全问题访问附件,id改为uuid,评论 2023-11-22 11:20:03 +08:00
xxq250 2ea41d0100 fixed 解决安全问题访问附件,id改为uuid 2023-11-22 11:17:22 +08:00
KingChan 6ae4aded65 Merge pull request '新增 uuid' (#229) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-21 17:11:51 +08:00
呱呱呱 2985dc7902 add uuid 2023-11-21 17:06:43 +08:00
yystopf 0c48eeb52b 更改:迭代工作项进度和工时容量接口合并 2023-11-21 08:28:49 +08:00
yystopf 3a693b88c0 Merge pull request '迭代中工作项进度和工时容量统计' (#228) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-11-20 16:42:38 +08:00
yystopf d6fbdd87d0 新增:迭代中工作项进度和工时容量统计 2023-11-20 16:40:20 +08:00
yystopf ed8ec15eda Merge pull request '项目中未关联迭代工作项接口' (#227) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-11-20 11:35:26 +08:00
yystopf 39423ff6ea 新增:项目中所有未关联迭代工作项 2023-11-20 11:32:14 +08:00
yystopf e683dddcaf Merge pull request '工作项部分修改' (#226) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-11-20 09:42:14 +08:00
yystopf 8030d7db1a 更改:删除工作项需删除子工作项放到回调中 2023-11-20 09:38:52 +08:00
yystopf b305b22a8a 更改:项目id为0时查询全部 2023-11-20 09:11:28 +08:00
yystopf f48ad14411 修复 2023-11-20 08:32:53 +08:00
yystopf 924406d59f Merge branch 'pm_project_develop' of https://gitlink.org.cn/Trustie/forgeplus into pm_project_develop 2023-11-20 08:29:28 +08:00
yystopf 6d90cbed81 新增:工作项关联项目查询 2023-11-20 08:29:18 +08:00
yystopf c27aa16699 Merge pull request '工作项关联项目改查以及删除子工作项逻辑修复' (#225) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-11-17 17:21:19 +08:00
yystopf 40c5525e0a 新增:工作项关联项目改查 2023-11-17 17:18:34 +08:00
yystopf 252cfcd353 Merge branch 'pm_project_develop' of https://gitlink.org.cn/Trustie/forgeplus into pm_project_develop 2023-11-17 16:42:58 +08:00
yystopf a3f0cf87e1 更改:删除工作项需删除子工作项 2023-11-17 16:29:40 +08:00
yystopf 7994839d96 Merge pull request '工作项部分修改' (#224) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-11-17 15:32:02 +08:00
yystopf fbad9859e6 新增:删除工作项同时删除子工作项 2023-11-17 15:29:19 +08:00
yystopf cbbd62121c 更改:批量删除数组为空时返回正常 2023-11-17 15:28:29 +08:00
yystopf 0e35a997f2 Merge pull request 'issue列表新增id返回' (#223) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-11-17 11:44:02 +08:00
yystopf d84b32f4f6 新增:issue列表新增id返回 2023-11-17 11:39:08 +08:00
yystopf 74d9e34187 Merge pull request '根据pm_project_id查询issue无法正常展示数据' (#222) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-11-17 09:55:20 +08:00
yystopf fe4d563d6b 更改:根据pm_project_id查询issue无法正常展示数据 2023-11-17 09:52:57 +08:00
yystopf a0e34c9ddd Merge pull request '组织项目列表返回仓库url' (#221) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-11-17 09:36:49 +08:00
yystopf c2f64adf17 新增:组织项目列表返回仓库url 2023-11-17 09:32:30 +08:00
KingChan 7da8102782 Merge pull request '修复jurnal 更新 product问题' (#220) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-16 17:02:58 +08:00
呱呱呱 3f8a7c7cee fix journal更新时的错误 2023-11-16 16:59:20 +08:00
KingChan 0eea1c7d65 Merge pull request 'pm issue journal 返回bug修复' (#219) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-16 16:47:24 +08:00
呱呱呱 d45dab31cb fix pm journal render error 2023-11-16 16:45:15 +08:00
KingChan 5e192db530 Merge pull request '修复bug' (#218) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-16 15:32:08 +08:00
呱呱呱 776533be8c fix bugs 2023-11-16 15:30:16 +08:00
KingChan 14d9ca760d Merge pull request 'pm link_index 增加倒序排序' (#217) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-16 15:15:33 +08:00
呱呱呱 aa9d45dc91 pm link_index 增加倒序排序 2023-11-16 15:13:45 +08:00
KingChan c92c86b65f Merge pull request '调整未关联issue 和设定组织搜索空间范围' (#216) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-16 15:09:59 +08:00
呱呱呱 84895231dc 调整未关联issue 和设定组织搜索空间范围 2023-11-16 15:08:04 +08:00
KingChan 5ea904b2aa Merge pull request '新增 topic返回' (#215) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-16 14:39:24 +08:00
呱呱呱 bbc3717737 add topic 2023-11-16 14:37:30 +08:00
KingChan 252b132a4a Merge pull request '新增 categroy 和 language 返回' (#214) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-16 14:30:47 +08:00
呱呱呱 b3252ddf85 add organizations/projects/index.json language category 2023-11-16 14:28:37 +08:00
KingChan 35556c0cd4 Merge pull request '修复 issue count 接口报错' (#213) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-16 14:17:52 +08:00
呱呱呱 23a1be8ce3 fix issue count error 2023-11-16 14:15:37 +08:00
yystopf ee5c8b4b9e Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into pm_project_develop 2023-11-16 13:55:14 +08:00
yystopf a3df60b185 Merge pull request 'url转义函数由CGI.escape改为URI.escape' (#212) from yystopf/forgeplus:standalone_develop into standalone_develop 2023-11-16 13:54:21 +08:00
yystopf 9e4e30a495 更改:url转义函数 2023-11-16 13:50:49 +08:00
KingChan c428c29042 Merge pull request 'issue project 为nil时的特殊处理' (#211) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-16 10:47:56 +08:00
呱呱呱 f9f0485e50 issue project 为nil时的特殊处理 2023-11-16 10:46:00 +08:00
KingChan e9318d38f9 Merge pull request 'issue 删除当project 为0时不处理' (#210) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-16 10:37:30 +08:00
呱呱呱 a303f3d01b issue 删除当project 为0时不处理 2023-11-16 10:35:27 +08:00
KingChan 63cb83b1d9 Merge pull request '调整 issue中 rootid 修改逻辑' (#209) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-16 10:28:37 +08:00
呱呱呱 c70e43d19b update issue update root id 2023-11-16 10:26:16 +08:00
KingChan fa7e24b580 Merge pull request '修复bug' (#208) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-16 10:12:31 +08:00
呱呱呱 ad30b56b26 fix issue update bug 2023-11-16 10:10:45 +08:00
KingChan da1f1b9c8c Merge pull request '调整create issue 中的PmLink创建' (#207) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-15 16:58:29 +08:00
呱呱呱 7ed4d12e95 调整create issue 中的PmLink创建 2023-11-15 16:56:37 +08:00
KingChan 1d4dae4202 Merge pull request '调整 pm issue link_index' (#206) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-15 14:21:04 +08:00
呱呱呱 dddc4f9752 update issue link index 2023-11-15 14:18:36 +08:00
KingChan a1c58b7a78 Merge pull request 'issue link_issues' (#205) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-15 11:49:10 +08:00
呱呱呱 0fda6721de issue link_issues 2023-11-15 11:47:17 +08:00
KingChan 9c76a6171a Merge pull request '调整links 返回,调整links删除查询' (#204) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-15 11:13:42 +08:00
呱呱呱 b0ecc0a30b 根据需求调整links 返回,调整links删除查询 2023-11-15 11:11:00 +08:00
KingChan 404f2fb671 Merge pull request '修复 issue list bug' (#203) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-15 10:31:31 +08:00
呱呱呱 d758b367b1 fix bug 2023-11-15 10:29:41 +08:00
KingChan 2f7e92092e Merge pull request '调整 issues 的 root id 判定' (#202) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-15 10:27:49 +08:00
呱呱呱 19458ac963 调整 issues 的 root id 判定 2023-11-15 10:25:59 +08:00
yystopf a61996bdc3 Merge pull request '项目管理-工作项部分接口补充' (#201) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-11-15 09:38:26 +08:00
KingChan ef18964ad1 Merge pull request '调整 pm issue journal返回值' (#200) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-15 09:37:49 +08:00
呱呱呱 6dda3ef6b9 add pm isssue jornal render 2023-11-15 09:35:35 +08:00
yystopf efa9ecfcb0 新增:status_ids数组查询 2023-11-15 09:27:06 +08:00
xxq250 33c56e3e79 fixed 评论回复增加parent_id索引,解决性能问题 2023-11-15 08:53:30 +08:00
xxq250 ce7a0e4884 fixed 评论回复增加parent_id索引,解决性能问题 2023-11-15 08:53:04 +08:00
xxq250 27bfeb5fc8 fixed 评论回复增加parent_id索引,解决性能问题 2023-11-15 08:52:23 +08:00
xxq250 5541002dab Merge branch 'pre_trustie_server' into trustie_server 2023-11-15 08:45:17 +08:00
xxq250 228209b52c fixed 容错处理 2023-11-15 08:44:35 +08:00
yystopf 9ee2c8dde3 修复:issue子评论关联查询错误 2023-11-15 08:44:35 +08:00
xxq250 783a2e39ae Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop 2023-11-15 08:43:06 +08:00
xxq250 9e91427de0 fixed 容错处理 2023-11-15 08:43:00 +08:00
yystopf 030d76e276 Merge branch 'pm_project_develop' of https://gitlink.org.cn/Trustie/forgeplus into pm_project_develop 2023-11-14 16:56:19 +08:00
yystopf 40ec406a19 Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into pm_project_develop 2023-11-14 16:55:50 +08:00
yystopf 9c02b8ba31 修复:issue子评论关联查询错误 2023-11-14 16:53:29 +08:00
KingChan ee25d7b477 Merge pull request '创建issue时的工作项关联' (#199) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-14 16:51:57 +08:00
呱呱呱 a644bfee25 创建issue时加上工作项关联 2023-11-14 16:50:00 +08:00
KingChan cd25b78625 Merge pull request '将issue_links接口改为支持数组类型' (#198) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-14 16:04:28 +08:00
呱呱呱 be45e45dbc 将issue_links接口改为支持数组类型 2023-11-14 16:02:26 +08:00
KingChan 4020fc3515 Merge pull request '调整更新接口中 chaner 的取值' (#197) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-14 14:41:05 +08:00
呱呱呱 a474934391 更新issue update中的 changer取值 2023-11-14 14:39:00 +08:00
yystopf e19eae7733 Merge pull request '项目管理-项目工作项接口补充' (#196) from yystopf/forgeplus:pm_project_develop into pm_project_develop 2023-11-14 11:10:17 +08:00
yystopf 8532281904 新增:上传文件新增字段返回 2023-11-14 11:03:58 +08:00
yystopf 7080b74ebe 更改:头像返回绝对地址 2023-11-14 10:56:44 +08:00
yystopf 0c553203c1 新增:issue更新者字段 2023-11-14 10:52:15 +08:00
yystopf 32386c2f66 新增:批量删除ids为空删除全部 2023-11-14 10:37:16 +08:00
yystopf 2437bda410 修复:无法根据root_id查询到对应issue 2023-11-14 10:17:30 +08:00
xxq250 71305d7304 pm issue 查询取消关联,防止关联保存 2023-11-10 10:14:15 +08:00
xxq250 df201d74e0 pm issue修改保存锁释放 2023-11-10 09:44:36 +08:00
KingChan 75a18c1fe4 Merge pull request 'pm issue 信息更新新增 rule' (#195) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-09 14:34:03 +08:00
呱呱呱 e4c4518e8b add rule for update pm 2023-11-09 14:31:55 +08:00
KingChan ea852a8ea6 Merge pull request '调整批量更新' (#194) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-09 14:22:32 +08:00
呱呱呱 6267217c4b update Api::V1::Issues::UpdateService 2023-11-09 14:20:34 +08:00
KingChan af97483873 Merge pull request 'Pm issue 调整更新参数' (#193) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-09 14:03:35 +08:00
呱呱呱 b1d8245a22 update 2023-11-09 14:01:12 +08:00
呱呱呱 12bf781c8b remote pm for routes 2023-11-09 11:24:35 +08:00
KingChan c2424d4633 Merge pull request '新增开始时间和结束时间排序' (#192) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-09 11:11:59 +08:00
呱呱呱 ed5bf51821 add issues.start_date and issues.due_date to issue_list service 2023-11-09 11:07:03 +08:00
KingChan 2cb7a1cf7e Merge pull request '调整方法名 mp_color - pm_color' (#191) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-08 16:30:48 +08:00
呱呱呱 7fb462d2db change name 2023-11-08 16:28:45 +08:00
KingChan 130024677f Merge pull request '返回issue状态和优先级颜色 PM' (#190) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-08 16:27:21 +08:00
呱呱呱 fcea1193b9 issue status and priority color 2023-11-08 16:24:10 +08:00
KingChan 4bc7b65726 Merge pull request 'pm issue link index返回结果移除issue本身' (#189) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-08 14:59:47 +08:00
呱呱呱 e66ae562b7 fix 2023-11-08 14:57:22 +08:00
KingChan 601d058edf Merge pull request '调整link_index' (#188) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-08 14:53:33 +08:00
呱呱呱 086b66d51d update pm link_index 2023-11-08 14:45:40 +08:00
KingChan cffd930d68 Merge pull request '修复mp issue bug' (#187) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-08 14:32:54 +08:00
呱呱呱 778f564e8b fix bug for pm issue 2023-11-08 14:31:03 +08:00
KingChan c4d181f887 Merge pull request '调整方法名字' (#186) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-08 11:01:28 +08:00
KingChan 8d44597916 Merge pull request '调整刷新顺序' (#185) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-08 10:59:46 +08:00
呱呱呱 a572554102 rename 2023-11-08 10:59:30 +08:00
呱呱呱 3fa3f3a7cc issue refresh aftercreate change to aftersave 2023-11-08 10:57:31 +08:00
KingChan 80ed1c5b8a Merge pull request '新增 issue child count' (#184) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-08 10:56:29 +08:00
呱呱呱 43be8d1724 update 2023-11-08 10:54:09 +08:00
KingChan 2f61c0963b Merge pull request 'pm issue link_index 增加 pm_issues_type 筛选' (#183) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-08 09:19:06 +08:00
呱呱呱 452890f825 pm issue link_index add pm_issues_type 2023-11-08 09:17:13 +08:00
KingChan 8af3613200 Merge pull request 'Pm issue新增 link_index 接口' (#182) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-08 09:09:27 +08:00
呱呱呱 ec43b9e97d add Pm issues link_index 2023-11-08 09:07:16 +08:00
KingChan 3aa4d6a33a Merge pull request 'PM link issue' (#181) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-07 17:19:30 +08:00
呱呱呱 c752671453 issue links 2023-11-07 17:16:25 +08:00
KingChan e83bad4df1 Merge pull request 'PM issue 中 parent_id 改为 root_id' (#180) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-07 14:32:43 +08:00
呱呱呱 00448f0f01 change parent_id to root_id 2023-11-07 14:30:28 +08:00
KingChan 084a5d0506 Merge pull request '获取pm issuet统计' (#179) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-07 11:50:20 +08:00
呱呱呱 8329cc113b add issue count to pm projects 2023-11-07 11:44:36 +08:00
KingChan f7ef709b71 Merge pull request 'issue 工时' (#178) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-07 09:56:31 +08:00
呱呱呱 005f1d4aa5 update issue index render 2023-11-07 09:54:50 +08:00
呱呱呱 289cb08ccd issue time_scale 2023-11-07 09:40:50 +08:00
KingChan a5da06b7b3 Merge pull request '同步代码' (#177) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-03 10:44:49 +08:00
xxq250 9c7ad15e38 fixed issue和评论里的附件解析关联,增强附件访问权限控制,切换到 项目保护 2023-11-03 10:38:22 +08:00
xxq250 5646aadfd6 fixed issue评论里的附件解析关联,增强附件访问权限控制 2023-11-03 10:38:22 +08:00
xxq250 3362c78765 fixed issue描述里的附件解析关联,增强附件访问权限控制 2023-11-03 10:37:53 +08:00
呱呱呱 b40fcf5d63 update project pm 2023-11-02 17:04:33 +08:00
KingChan b06785dd54 Merge pull request '新增Pm project' (#176) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-02 15:06:39 +08:00
呱呱呱 840bbff88a add project pm 2023-11-02 15:04:43 +08:00
KingChan cf26f7b51b Merge pull request '修复bug' (#175) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-02 14:43:31 +08:00
呱呱呱 dd30341f6e fix bug 2023-11-02 14:41:33 +08:00
呱呱呱 468c5a3c41 add pm issue 的 pm_project_id 判定 2023-11-02 11:38:52 +08:00
KingChan 99fbd4c04d Merge pull request '调整pm webhook 逻辑' (#174) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-02 11:00:53 +08:00
呱呱呱 8e658d4d12 调整Pm webhook逻辑 2023-11-02 10:57:09 +08:00
KingChan 767b232ed4 Merge pull request '关闭Pm的webhook推送' (#173) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-02 10:49:34 +08:00
呱呱呱 af002c731d close pm webhook 2023-11-02 10:46:31 +08:00
KingChan 32251e8a7b Merge pull request 'Pm项目关闭grimoirelab推送事件' (#172) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-02 10:29:22 +08:00
呱呱呱 061b71955f pm 关闭grimoirelab推送事件 2023-11-02 10:26:47 +08:00
KingChan 44d6de067d Merge pull request '项目管理-调整issue tags' (#171) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-02 09:20:09 +08:00
呱呱呱 f00c3931a8 update issue tags for pm 2023-11-02 09:17:32 +08:00
KingChan 8fd38c0638 Merge pull request 'Pm issue 改造' (#170) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-01 16:53:04 +08:00
呱呱呱 5c72feb705 pm issue and journal 2023-11-01 16:49:00 +08:00
KingChan 41bdbd9531 Merge pull request '调整Pm Issue相关接口' (#169) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-11-01 10:47:32 +08:00
呱呱呱 36a659678d gm issue 2023-11-01 10:45:06 +08:00
呱呱呱 770f743750 issue pm 2023-10-31 17:03:35 +08:00
KingChan 99cab85b54 Merge pull request 'issue index 改造' (#168) from KingChan/forgeplus:pm_project_develop into pm_project_develop 2023-10-31 09:18:02 +08:00
呱呱呱 51648e52b3 issue index for pm 2023-10-31 09:11:54 +08:00
呱呱呱 92cefd34b2 stash 2023-10-31 08:19:41 +08:00
xxq250 e4bf925905 fixed issue和评论里的附件解析关联,增强附件访问权限控制,切换到 项目保护 2023-10-31 08:19:41 +08:00
xxq250 34a7add47c fixed issue评论里的附件解析关联,增强附件访问权限控制 2023-10-31 08:19:41 +08:00
xxq250 da5972698f fixed issue描述里的附件解析关联,增强附件访问权限控制 2023-10-31 08:19:41 +08:00
xxq250 6a989f972a Merge branch 'pre_trustie_server' into trustie_server
# Conflicts:
#	app/models/issue.rb
#	app/models/journal.rb
2023-10-24 20:46:02 +08:00
xxq250 2e2f7b2bd5 fixed issue和评论里的附件解析关联,增强附件访问权限控制,切换到 项目保护 2023-10-24 20:43:19 +08:00
xxq250 cf190632a1 fixed issue评论里的附件解析关联,增强附件访问权限控制 2023-10-24 20:43:19 +08:00
xxq250 d4d96759ac fixed issue描述里的附件解析关联,增强附件访问权限控制 2023-10-24 20:43:18 +08:00
xxq250 25df7c02d5 fixed issue和评论里的附件解析关联,增强附件访问权限控制,切换到 项目保护 2023-10-24 20:41:02 +08:00
呱呱呱 2e43bab1b5 mp_issues 新增对product id 处理 2023-10-18 16:37:35 +08:00
呱呱呱 f6ffaa82a6 根据pm管理需求新增issue接口 2023-10-18 16:13:20 +08:00
xxq250 e8b36f33ed fixed issue评论里的附件解析关联,增强附件访问权限控制 2023-10-18 15:34:16 +08:00
xxq250 467a4f0b94 fixed issue描述里的附件解析关联,增强附件访问权限控制 2023-10-18 15:34:16 +08:00
xxq250 abbb033fc7 fixed issue评论里的附件解析关联,增强附件访问权限控制 2023-10-18 15:24:39 +08:00
xxq250 99fe06c788 fixed issue描述里的附件解析关联,增强附件访问权限控制 2023-10-18 15:16:14 +08:00
xxq250 fa1a03e4db Merge branch 'pre_trustie_server' into trustie_server 2023-10-18 14:02:49 +08:00
xxq250 28b8e15fea fixed 设置非公开图片权限 2023-10-18 13:59:54 +08:00
呱呱呱 624e5b150e 设置非public图片查看权限 2023-10-18 13:57:54 +08:00
KingChan 6a057dedd0 Merge pull request '修复问题' (#164) from KingChan/forgeplus:chenjing into standalone_develop 2023-10-18 13:39:45 +08:00
呱呱呱 93dc10b6a5 fix attachment_candown 2023-10-18 13:38:09 +08:00
KingChan fffe776cd5 Merge pull request '图片查看权限调整' (#163) from KingChan/forgeplus:chenjing into standalone_develop 2023-10-18 13:36:13 +08:00
呱呱呱 2c4253b04b 设置非public图片查看权限 2023-10-18 13:27:09 +08:00
呱呱呱 526dac1230 change mp to pm 2023-10-18 13:21:41 +08:00
KingChan ce1d6707b8 Merge pull request 'issue_priorities issue_tags issue_statues 新增 mp_index' (#162) from KingChan/forgeplus:chenjing into standalone_develop 2023-10-17 11:27:20 +08:00
呱呱呱 472499e278 mp_index for issue_priorities issue_tags issue_statues 2023-10-17 11:25:25 +08:00
KingChan 2fde0da442 Merge pull request '通过仓库id拿用户标识和仓库标识' (#161) from KingChan/forgeplus:chenjing into standalone_develop 2023-10-16 10:59:21 +08:00
呱呱呱 d19c94666a 通过仓库id拿用户标识和仓库标识 2023-10-16 10:57:37 +08:00
xxq250 bf232f3518 Merge branch 'pre_trustie_server' into trustie_server 2023-10-13 14:14:46 +08:00
xxq250 50a0ecdbd2 Merge branch 'standalone_develop' into pre_trustie_server 2023-10-13 14:14:07 +08:00
KingChan a27a352dfb Merge pull request '判定用户是否在组织下' (#160) from KingChan/forgeplus:chenjing into standalone_develop 2023-10-12 11:26:57 +08:00
呱呱呱 d60ba95444 OrganizationUsers add pm_check_user 2023-10-12 11:25:23 +08:00
KingChan f5bf0c7a87 Merge pull request '检测用户是否在团队下' (#159) from KingChan/forgeplus:chenjing into standalone_develop 2023-10-12 11:14:41 +08:00
呱呱呱 19d36af37f update 2023-10-12 11:12:53 +08:00
xxq250 bb0bbeb06c fixed 文件增加是否文本判断,可显示多种文本文件 2023-10-11 17:25:24 +08:00
xxq250 1e427a62a6 Merge pull request '20231011版本' (#338) from Trustie/forgeplus:standalone_develop into develop 2023-10-11 10:15:55 +08:00
xxq250 ef3472567e fixed 组织pr识别 2023-10-07 21:12:58 +08:00
xxq250 e07af929b2 Merge branch 'pre_trustie_server' into trustie_server 2023-10-07 20:08:08 +08:00
xxq250 31b07e47a9 Merge branch 'standalone_develop' into pre_trustie_server 2023-10-07 20:07:31 +08:00
xxq250 4c354f6841 Merge branch 'pre_trustie_server' into trustie_server 2023-09-28 15:33:37 +08:00
xxq250 9cd148e108 Merge branch 'standalone_develop' into pre_trustie_server 2023-09-28 15:32:43 +08:00
xxq250 e6f2e9a798 Merge branch 'pre_trustie_server' into trustie_server 2023-09-26 15:01:07 +08:00
xxq250 0da32d15a9 Merge branch 'standalone_develop' into pre_trustie_server 2023-09-26 15:00:37 +08:00
xxq250 c6461de871 Merge branch 'pre_trustie_server' into trustie_server 2023-09-25 17:58:15 +08:00
xxq250 09bab2f462 Merge branch 'standalone_develop' into pre_trustie_server 2023-09-25 17:57:57 +08:00
xxq250 02b85859b5 pages 合并 2023-09-25 10:50:35 +08:00
xxq250 14462752cc Merge branch 'standalone_develop' into pre_trustie_server 2023-09-25 10:47:59 +08:00
xxq250 18377dc2e0 Merge branch 'pre_trustie_server' into trustie_server 2023-08-31 16:08:38 +08:00
xxq250 743c63a796 fixed 文件无权限提示修改 2023-08-31 16:07:48 +08:00
xxq250 74c42f679a fixed 册除失败提示 2023-08-31 16:07:48 +08:00
xxq250 300dffd2a1 fixed 分支删除时有开启的pr需要一同关闭,整理fix 2023-08-31 16:07:47 +08:00
xxq250 9db60413d9 fixed 分支删除时有开启的pr需要一同关闭,整理 2023-08-31 16:07:47 +08:00
xxq250 04c147d80d fixed 分支删除时有开启的pr需要一同关闭,合并请求下issue关闭 2023-08-31 16:07:46 +08:00
xxq250 1da6c582f0 fixed 分支删除时有开启的pr需要一同关闭 2023-08-31 16:07:46 +08:00
xxq250 2e15988ad6 gitea api error log show 2023-08-31 16:07:30 +08:00
xxq250 f47c4e4b9c gitea api error show 2023-08-31 16:07:29 +08:00
xxq250 1d1d6ebda1 fixed 注册时支持中划线的邮箱地址 2023-08-31 16:07:14 +08:00
xxq250 56103a885b fixed fork后重命名项目标识再forked失败 2023-08-31 16:07:14 +08:00
xxq250 cdf62b4626 fixed 分支删除时有开启的pr需要一同关闭 2023-08-30 17:42:24 +08:00
xxq250 53b66f6145 fixed 文件增加编辑删除操作无权限提示修改 2023-08-30 16:34:23 +08:00
xxq250 c9659fd926 fixed fork后重命名项目标识再forked失败 2023-08-22 12:25:15 +08:00
xxq250 b73f724bb7 fixed fork后重命名项目标识再forked失败 2023-08-22 11:45:10 +08:00
xxq250 ca85975197 fixed fork后重命名项目标识再forked失败 2023-08-22 11:42:26 +08:00
呱呱呱 9763d5c780 fix fork create bug 2023-08-22 09:46:06 +08:00
xxq250 391059602e Merge branch 'pre_trustie_server' into trustie_server
# Conflicts:
#	app/helpers/repositories_helper.rb
2023-08-16 17:18:03 +08:00
xxq250 dd938a218e Merge pull request 'GLCC PR检测并发送邮件功能' (#104) from KingChan/forgeplus:pr_detection into pre_trustie_server 2023-08-16 17:15:39 +08:00
xxq250 0ea45459b8 fixed PR中合并来源显示错误,列表 2023-08-11 17:33:42 +08:00
xxq250 d1adffbd76 fixed PR中合并来源显示错误 2023-08-11 17:24:05 +08:00
xxq250 232bef8f88 fixed readme图片解析增加多种格式 2023-08-09 16:43:35 +08:00
xxq250 7e29a5d47f fixed readme图片解析增加多种格式 2023-08-09 16:43:34 +08:00
xxq250 174a2d47dc fixed @compare_result null done 2023-08-07 15:20:33 +08:00
xxq250 9f23400d2a readme中变量路径修正,放行符处理 2023-07-28 17:56:40 +08:00
xxq250 3527e89866 readme中变量路径修正,放行符处理 2023-07-28 17:54:14 +08:00
xxq250 9a5a4e8d66 readme中变量路径修正 2023-07-27 18:33:29 +08:00
xxq250 92f0ed71a1 readme中变量图片相对路径 2023-07-27 18:10:33 +08:00
xxq250 9428b5aebb SyncRepoUpdateTimeJob stop 2023-07-27 15:38:45 +08:00
xxq250 72f88c8c13 Update deploy.md 2023-07-18 15:52:54 +08:00
xxq250 349c775404 fixed 更新时判断是否有昵称 2023-07-17 23:05:26 +08:00
xxq250 dd914595fa 用户支持手机号搜索 2023-07-17 21:47:20 +08:00
xxq250 3ac9c0b5d8 merge develop 2023-07-14 14:07:48 +08:00
xxq250 0f5b0b6b48 Merge branch 'standalone_develop' into pre_trustie_server 2023-07-14 14:04:49 +08:00
xxq250 0f45f31db0 Get gitea tokens 2023-07-12 15:22:32 +08:00
xxq250 3bd4187b0e fixed diff接口切换到hat 2023-07-11 17:00:57 +08:00
xxq250 46456d956a fixed 调用区块链接口 2023-07-11 15:30:01 +08:00
xxq250 f15bc3a3bf fixed log跟踪 2023-07-11 15:16:46 +08:00
xxq250 466705bd0f fixed 项目detail 2023-07-10 14:02:08 +08:00
xxq250 a40c5a7619 贡献者数量调整 2023-07-07 17:14:25 +08:00
xxq250 fc4520c06f 项目贡献排行分页参数3年内 2023-07-07 10:32:55 +08:00
xxq250 909488b072 项目贡献排行分页参数3年内 2023-07-07 10:31:35 +08:00
xxq250 3a2b476dd0 项目贡献排行分页参数 2023-07-07 10:05:07 +08:00
xxq250 bbacebc1c9 更新文件失败处理 2023-07-06 16:04:28 +08:00
xxq250 c344859063 更新文件日志 2023-07-06 15:37:37 +08:00
xxq250 c85a15b794 更新文件日志 2023-07-06 15:26:23 +08:00
xxq250 1b68e7c9d5 fixed: user rank project owner changed remove rank 2023-07-04 16:08:40 +08:00
xxq250 2b03ccc67c Merge branch 'pre_trustie_server' into trustie_server 2023-06-30 17:11:56 +08:00
xxq250 f18f71db9c Merge branch 'standalone_develop' into pre_trustie_server 2023-06-30 17:10:32 +08:00
chenjing 921c285d0f fix bug 2023-06-26 11:15:44 +08:00
chenjing bc7008d8a4 fix bug 2023-06-26 11:15:06 +08:00
xxq250 61b0d4d302 Merge branch 'pre_trustie_server' into trustie_server 2023-06-21 16:33:51 +08:00
xxq250 f094c3a84c Merge branch 'pre_trustie_server' into trustie_server 2023-06-21 16:19:54 +08:00
xxq250 3b896fca3d fixed job中issue不存在处理 2023-06-19 15:45:14 +08:00
xxq250 0faf192b45 fixed job中issue不存在处理 2023-06-19 15:41:28 +08:00
xxq250 076120de8d fixed job中issue不存在 2023-06-19 15:39:45 +08:00
xxq250 63cc2528cd Update README.md 2023-06-15 14:47:00 +08:00
xxq250 e3df5a0f64 Update README.md 2023-06-15 14:45:32 +08:00
xxq250 6be6dd1bf1 fixed readme中图片链接问号处理2 2023-06-15 14:43:13 +08:00
xxq250 d0baa9073d fixed readme中图片链接问号处理 2023-06-15 14:38:31 +08:00
xxq250 f28d835e58 Update README.md 2023-06-15 14:35:34 +08:00
xxq250 f4a7903613 fixed readme中图片链接问号处理 2023-06-15 14:31:00 +08:00
xxq250 a74b6a1ca4 Update README.md 2023-06-15 13:58:23 +08:00
xxq250 6e42b84040 图片链接 2023-06-15 13:54:49 +08:00
xxq250 a46de1b658 fixed 发送通知报错 2023-06-12 18:10:15 +08:00
xxq250 89c64e276e site css 2023-06-09 17:45:54 +08:00
xxq250 46252c2feb site css 2023-06-09 15:54:08 +08:00
xxq250 eb8266db90 site css 2023-06-09 15:52:04 +08:00
xxq250 31923c9086 competition 配置 2023-06-09 15:49:26 +08:00
xxq250 5135f60e50 merge pre 2023-06-09 15:38:41 +08:00
xxqfamous b114ee9701 fixed 最后提交增加参数stat加整 2023-06-06 17:55:04 +08:00
xxqfamous d6aa23b484 fixed 注册错误记录日志 2023-06-05 16:21:05 +08:00
xxqfamous 1b93da7f67 Merge branch 'standalone_develop' into trustie_server 2023-06-05 16:05:28 +08:00
xxqfamous cddb204d28 Merge branch 'pre_trustie_server' into trustie_server 2023-06-05 15:01:36 +08:00
xxqfamous da7e0a4143 Merge branch 'pre_trustie_server' into trustie_server 2023-05-30 18:34:00 +08:00
xxqfamous 7116f38061 fixed 修改用户参数错误 log 2023-05-30 14:00:36 +08:00
xxqfamous a7968ed95c fixed 修改用户参数错误 log 2023-05-30 13:55:48 +08:00
xxqfamous 2998fce62e fixed 修改用户参数错误 log 2023-05-30 13:51:29 +08:00
xxqfamous b45e9fb224 fixed 修改用户参数错误 log 2023-05-30 12:40:30 +08:00
xxqfamous fa57d3a9ba fixed 修改用户参数错误 log 2023-05-30 12:38:36 +08:00
xxqfamous 9c9c376224 fixed 修改用户参数错误 log 2023-05-30 12:36:43 +08:00
xxqfamous cc6228bcfe fixed 修改用户参数错误 2023-05-30 12:34:49 +08:00
xxqfamous 818781f6e0 fixed 修改用户参数错误 2023-05-30 12:34:09 +08:00
xxqfamous ba134ad0fa fixed 修改用户 log 2023-05-30 12:27:16 +08:00
xxqfamous 1327fcb4f4 fixed 修改用户 log 2023-05-30 12:25:34 +08:00
xxqfamous 166952560e fixed 修改用户 log 2023-05-30 11:43:59 +08:00
xxqfamous 7fdd39291b fixed 修改用户 2023-05-30 11:41:36 +08:00
xxqfamous d78408d799 Merge branch 'pre_trustie_server' into trustie_server 2023-05-30 11:38:33 +08:00
xxqfamous f289b8046f 竞赛用户关联优化 2023-05-30 11:16:54 +08:00
xxqfamous 41a9773c90 注册失败日志 2023-05-29 15:15:52 +08:00
xxqfamous d14fca3792 fixed 项目查询增加id参数 2023-05-24 14:35:26 +08:00
xxq250 b66293b044 Add Dockerfile-ruby 2023-05-24 10:12:10 +08:00
xxqfamous 9449bd6eb9 fixed 补偿users.gitea_uid不存在的用户,error message 2023-05-22 14:20:47 +08:00
xxqfamous 9f4d9aa5db fixed 补偿users.gitea_uid不存在的用户,error message 2023-05-22 14:17:24 +08:00
xxqfamous a336e91dd8 fixed 补偿users.gitea_uid不存在的用户 2023-05-22 14:02:42 +08:00
xxqfamous 65a00efd32 fixed 补偿users.gitea_uid不存在的用户 2023-05-22 14:01:14 +08:00
xxqfamous 9859c30f9d fixed 补偿users.gitea_uid不存在的用户 2023-05-22 11:35:26 +08:00
xxqfamous 9232f3ca9b fixed 补偿users.gitea_uid不存在的用户 2023-05-22 11:33:00 +08:00
xxqfamous 24ac425c21 fixed 修改user login唯一索引 2023-05-22 11:22:12 +08:00
xxqfamous e16452ac90 fixed 修改user login唯一索引 2023-05-20 12:28:35 +08:00
xxqfamous 8cc565ca0c fixed 修改user login唯一索引 2023-05-20 12:27:34 +08:00
xxqfamous 1b2a4e0b94 fixed 清除user未使用关联表 2023-05-20 11:35:20 +08:00
xxqfamous 99f7fe6102 Merge branch 'pre_trustie_server' into trustie_server 2023-05-19 15:01:10 +08:00
xxq250 681a485192 fixed 审批utf8mb4 2023-05-18 09:50:56 +08:00
xxq250 58354dc944 Merge branch 'pre_trustie_server' into trustie_server 2023-05-12 17:06:36 +08:00
xxq250 e815710c57 Update Dockerfile 2023-05-11 10:27:42 +08:00
xxq250 dbcac032dd Update Dockerfile 2023-05-11 10:23:36 +08:00
xxq250 d1c8f1aead 整理gitea docker配置文件 2023-05-10 18:38:35 +08:00
xxq250 bf1ffadf41 整理docker配置文件 2023-05-10 17:41:15 +08:00
xxq250 f07ae49246 整理配置文件 2023-05-10 17:31:57 +08:00
xxq250 5eee13ea87 Merge pull request '20230220版本' (#332) from master into develop 2023-05-10 14:48:41 +08:00
558 changed files with 110307 additions and 1309 deletions

6
.gitignore vendored
View File

@ -10,7 +10,8 @@
# Ignore lock config file # Ignore lock config file
*.log *.log
.rubocop.yml
.env
# mac # mac
*.DS_Store *.DS_Store
.bashrc .bashrc
@ -84,4 +85,5 @@ redis_data/
dump.rdb dump.rdb
.tags* .tags*
ceshi_user.xlsx ceshi_user.xlsx
public/trace_task_results public/trace_task_results
public/项目活跃度排行.xls

View File

@ -1,13 +1,17 @@
FROM ubuntu:20.04 FROM ubuntu:20.04
RUN apt-get update RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt install -y tzdata
# basics # basics
RUN apt-get install -y libssl-dev curl libmysqlclient-dev imagemagick nodejs mysql-server redis-server tzdata RUN apt-get install -y libssl-dev curl libmysqlclient-dev imagemagick nodejs mysql-server redis-server
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# confirm openssl version # confirm openssl version
RUN openssl version RUN openssl version
RUN which openssl RUN which openssl
# install RVM, Ruby, and Bundler # install RVM, Ruby, and Bundler
RUN \curl -L https://get.rvm.io | bash -s stable RUN \curl -L https://get.rvm.io | bash -s stable
# rvm environment variable
RUN /bin/bash -l -c "source /etc/profile.d/rvm.sh"
RUN /bin/bash -l -c "rvm requirements" RUN /bin/bash -l -c "rvm requirements"
# replace ruby mirror url, accelerate install ruby # replace ruby mirror url, accelerate install ruby
RUN sed -i 's/rvm_remote_server_url2/#rvm_remote_server_url2/g' /usr/local/rvm/config/db RUN sed -i 's/rvm_remote_server_url2/#rvm_remote_server_url2/g' /usr/local/rvm/config/db
@ -37,11 +41,19 @@ RUN /bin/bash -l -c 'gem install puma -v 5.6.5'
RUN rm -rf Gemfile.lock RUN rm -rf Gemfile.lock
RUN cp config/configuration.yml.example config/configuration.yml RUN cp config/configuration.yml.example config/configuration.yml
RUN cp config/database.yml.example config/database.yml RUN cp config/database-docker.yml.example config/database.yml
RUN touch config/redis.yml RUN touch config/redis.yml
RUN touch config/elasticsearch.yml RUN touch config/elasticsearch.yml
RUN /bin/bash -l -c 'bundle install' RUN /bin/bash -l -c 'bundle install'
#EXPOSE 4000 RUN redis-server &
#RUN /bin/bash -l -c 'RAILS_ENV=production puma'
RUN /bin/bash -l -c 'bundle exec rake sync_table_structure:import_csv'
RUN /bin/bash -l -c 'rails db:migrate RAILS_ENV=development'
RUN /bin/bash -l -c 'bundle exec sidekiq -C config/sidekiq.yml -e production -d'
EXPOSE 4000
RUN /bin/bash -l -c 'RAILS_ENV=production puma -C config/puma.rb'

19
Dockerfile-ruby Normal file
View File

@ -0,0 +1,19 @@
FROM ubuntu:20.04
RUN apt-get update
# basics
RUN apt-get install -y libssl-dev curl libmysqlclient-dev imagemagick nodejs mysql-server redis-server tzdata
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# confirm openssl version
RUN openssl version
RUN which openssl
# install RVM, Ruby, and Bundler
RUN \curl -L https://get.rvm.io | bash -s stable
RUN /bin/bash -l -c "rvm requirements"
# replace ruby mirror url, accelerate install ruby
RUN sed -i 's/rvm_remote_server_url2/#rvm_remote_server_url2/g' /usr/local/rvm/config/db
RUN sed -i 's/cache.ruby-lang.org/cache.ruby-china.com/g' /usr/local/rvm/config/db
# install ruby
RUN /bin/bash -l -c "rvm install 2.4.5"
# confirm ruby version
RUN /bin/bash -l -c "rvm list"
RUN /bin/bash -l -c "ruby -v"

View File

@ -1,5 +1,6 @@
#source 'https://gems.ruby-china.com' #source 'https://gems.ruby-china.com'
source 'https://mirrors.cloud.tencent.com/rubygems/' source 'https://mirrors.cloud.tencent.com/rubygems/'
#source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" } git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem 'rails', '~> 5.2.0' gem 'rails', '~> 5.2.0'
@ -26,7 +27,7 @@ gem 'roo-xls'
gem 'simple_xlsx_reader', '~>1.0.4' gem 'simple_xlsx_reader', '~>1.0.4'
gem 'rubyzip' gem 'rubyzip'
gem 'sonarqube', :git => 'https://gitlink.org.cn/KingChan/sonarqube.git'
gem 'spreadsheet' gem 'spreadsheet'
gem 'ruby-ole' gem 'ruby-ole'
# 导出为xlsx # 导出为xlsx
@ -70,6 +71,7 @@ group :development do
gem 'web-console', '>= 3.3.0' gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2' gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring' gem 'spring'
gem 'pry-rails'
gem 'spring-watcher-listen', '~> 2.0.0' gem 'spring-watcher-listen', '~> 2.0.0'
gem "annotate", "~> 2.6.0" gem "annotate", "~> 2.6.0"
end end
@ -114,7 +116,6 @@ gem 'aasm'
gem 'enumerize' gem 'enumerize'
gem 'diffy' gem 'diffy'
gem 'deep_cloneable', '~> 3.0.0' gem 'deep_cloneable', '~> 3.0.0'
# oauth2 # oauth2
@ -141,4 +142,6 @@ gem 'doorkeeper'
gem 'doorkeeper-jwt' gem 'doorkeeper-jwt'
gem 'gitea-client', '~> 1.4.2' gem 'gitea-client', '~> 1.6.1'
gem 'loofah', '~> 2.20.0'

View File

@ -99,6 +99,7 @@ GEM
archive-zip (~> 0.10) archive-zip (~> 0.10)
nokogiri (~> 1.8) nokogiri (~> 1.8)
chunky_png (1.3.11) chunky_png (1.3.11)
coderay (1.1.3)
concurrent-ruby (1.1.6) concurrent-ruby (1.1.6)
connection_pool (2.2.2) connection_pool (2.2.2)
crass (1.0.6) crass (1.0.6)
@ -135,7 +136,7 @@ GEM
fugit (1.4.1) fugit (1.4.1)
et-orbi (~> 1.1, >= 1.1.8) et-orbi (~> 1.1, >= 1.1.8)
raabro (~> 1.4) raabro (~> 1.4)
gitea-client (1.4.2) gitea-client (1.5.9)
rest-client (~> 2.1.0) rest-client (~> 2.1.0)
globalid (0.4.2) globalid (0.4.2)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
@ -148,7 +149,7 @@ GEM
hashie (3.6.0) hashie (3.6.0)
htmlentities (4.3.4) htmlentities (4.3.4)
http-accept (1.7.0) http-accept (1.7.0)
http-cookie (1.0.5) http-cookie (1.0.8)
domain_name (~> 0.5) domain_name (~> 0.5)
i18n (1.8.2) i18n (1.8.2)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
@ -178,7 +179,8 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4) rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7) rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2) ruby_dep (~> 1.2)
loofah (2.4.0) logger (1.6.6)
loofah (2.20.0)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
mail (2.7.1) mail (2.7.1)
@ -187,9 +189,10 @@ GEM
mimemagic (~> 0.3.2) mimemagic (~> 0.3.2)
maruku (0.7.3) maruku (0.7.3)
method_source (0.9.2) method_source (0.9.2)
mime-types (3.4.1) mime-types (3.6.0)
logger
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1) mime-types-data (3.2025.0220)
mimemagic (0.3.10) mimemagic (0.3.10)
nokogiri (~> 1) nokogiri (~> 1)
rake rake
@ -244,14 +247,18 @@ GEM
popper_js (1.16.0) popper_js (1.16.0)
powerpack (0.1.2) powerpack (0.1.2)
prettier (0.18.2) prettier (0.18.2)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (4.0.3) public_suffix (4.0.3)
puma (3.12.2) puma (5.6.5)
nio4r (~> 2.0)
raabro (1.4.0) raabro (1.4.0)
rack (2.0.9) rack (2.0.9)
rack-cors (1.1.1) rack-cors (1.1.1)
rack (>= 2.0.0) rack (>= 2.0.0)
rack-mini-profiler (2.0.1)
rack (>= 1.2.0)
rack-protection (2.0.8.1) rack-protection (2.0.8.1)
rack rack
rack-test (1.1.0) rack-test (1.1.0)
@ -448,9 +455,7 @@ GEM
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (4.2.0) uglifier (4.2.0)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
unf (0.1.4) unf (0.2.0)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (1.6.1) unicode-display_width (1.6.1)
web-console (3.7.0) web-console (3.7.0)
actionview (>= 5.0) actionview (>= 5.0)
@ -492,7 +497,7 @@ DEPENDENCIES
enumerize enumerize
faraday (~> 0.15.4) faraday (~> 0.15.4)
font-awesome-sass (= 4.7.0) font-awesome-sass (= 4.7.0)
gitea-client (~> 1.4.2) gitea-client (~> 1.5.8)
grape-entity (~> 0.7.1) grape-entity (~> 0.7.1)
groupdate (~> 4.1.0) groupdate (~> 4.1.0)
harmonious_dictionary (~> 0.0.1) harmonious_dictionary (~> 0.0.1)
@ -502,6 +507,7 @@ DEPENDENCIES
kaminari (~> 1.1, >= 1.1.1) kaminari (~> 1.1, >= 1.1.1)
letter_avatar letter_avatar
listen (>= 3.0.5, < 3.2) listen (>= 3.0.5, < 3.2)
loofah (~> 2.20.0)
mysql2 (>= 0.4.4, < 0.6.0) mysql2 (>= 0.4.4, < 0.6.0)
oauth2 oauth2
omniauth (~> 1.9.0) omniauth (~> 1.9.0)
@ -514,9 +520,9 @@ DEPENDENCIES
parallel (~> 1.19, >= 1.19.1) parallel (~> 1.19, >= 1.19.1)
pdfkit pdfkit
prettier prettier
puma (~> 3.11) pry-rails
puma (~> 5.6.5)
rack-cors rack-cors
rack-mini-profiler
rails (~> 5.2.0) rails (~> 5.2.0)
rails-i18n (~> 5.1) rails-i18n (~> 5.1)
ransack ransack
@ -538,7 +544,7 @@ DEPENDENCIES
sidekiq-cron (= 1.2.0) sidekiq-cron (= 1.2.0)
sidekiq-failures sidekiq-failures
simple_form simple_form
simple_xlsx_reader simple_xlsx_reader (~> 1.0.4)
sinatra sinatra
solargraph (~> 0.38.0) solargraph (~> 0.38.0)
spreadsheet spreadsheet

View File

@ -3,7 +3,8 @@
GitLink确实开源是中国计算机学会CCF官方指定的开源创新服务平台旨在以“为开源创新服务”为使命以“成为开源创新的汇聚地”为愿景秉承“创新、开放、协作、共享”的价值观致力于为大规模开源开放协同创新助力赋能打造创新成果孵化和新工科人才培养的开源创新生态 GitLink确实开源是中国计算机学会CCF官方指定的开源创新服务平台旨在以“为开源创新服务”为使命以“成为开源创新的汇聚地”为愿景秉承“创新、开放、协作、共享”的价值观致力于为大规模开源开放协同创新助力赋能打造创新成果孵化和新工科人才培养的开源创新生态
<center> <center>
<img src="https://code.gitlink.org.cn/young/forgeplus/raw/branch/master/docs/figs/gitlink.png?raw=true" width=80% /></center> <img src="docs/figs/gitlink.png" width=80% /></center>
## 特色功能 ## 特色功能
@ -174,31 +175,31 @@ http://localhost:3000/
- 项目列表 - 项目列表
<center> <center>
<img src="https://code.gitlink.org.cn/young/forgeplus/raw/branch/master/docs/figs/project_list.png?raw=true" width=50% /> <img src="docs/figs/project_list.png" width=80% />
</center> </center>
- 代码仓库 - 代码仓库
<center> <center>
<img src="https://code.gitlink.org.cn/young/forgeplus/raw/branch/master/docs/figs/repo.png?raw=true" width=50% /> <img src="docs/figs/repo.png" width=80% />
</center> </center>
- 任务管理 - 任务管理
<center> <center>
<img src="https://code.gitlink.org.cn/young/forgeplus/raw/branch/master/docs/figs/issues.png?raw=true" width=50% /> <img src="docs/figs/issues.png" width=80% />
</center> </center>
- 合并请求 - 合并请求
<center> <center>
<img src="https://code.gitlink.org.cn/young/forgeplus/raw/branch/master/docs/figs/PR.png?raw=true" width=50% /> <img src="docs/figs/PR.png" width=80% />
</center> </center>
- 引擎配置 - 引擎配置
<center> <center>
<img src="https://code.gitlink.org.cn/young/forgeplus/raw/branch/master/docs/figs/engine.png?raw=true" width=50% /> <img src="docs/figs/engine.png" width=80% />
</center> </center>

View File

@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.

View File

@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.

View File

@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.

View File

@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.

View File

@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.

View File

@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.

View File

@ -40,6 +40,13 @@ body {
} }
} }
} }
.editormd .CodeMirror{
margin-top: 35px!important;
}
.CodeMirror-gutter .CodeMirror-linenumbers {
width: 28px!important;
}
input.form-control { input.form-control {
font-size: 14px; font-size: 14px;

View File

@ -0,0 +1,3 @@
// Place all the styles related to the api/pm/issue_links controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,3 @@
// Place all the styles related to the api/pm/projects controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,3 @@
// Place all the styles related to the api/v1/pm_issues controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,3 @@
// Place all the styles related to the api/v1/sonarqube/issues controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,3 @@
// Place all the styles related to the api/v1/sonarqubes controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,3 @@
// Place all the styles related to the pm/journals controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -1,6 +1,7 @@
class AccountsController < ApplicationController class AccountsController < ApplicationController
before_action :require_login, only: [:login_check, :simple_update] before_action :require_login, only: [:login_check, :simple_update, :change_password]
include ApplicationHelper include ApplicationHelper
include AesCryptHelper
#skip_before_action :check_account, :only => [:logout] #skip_before_action :check_account, :only => [:logout]
@ -31,11 +32,12 @@ class AccountsController < ApplicationController
username = params[:username]&.gsub(/\s+/, "") username = params[:username]&.gsub(/\s+/, "")
tip_exception("无法使用以下关键词:#{username},请重新命名") if ReversedKeyword.check_exists?(username) tip_exception("无法使用以下关键词:#{username},请重新命名") if ReversedKeyword.check_exists?(username)
email = params[:email]&.gsub(/\s+/, "") email = params[:email]&.gsub(/\s+/, "")
phone = params[:phone]&.gsub(/\s+/, "")
password = params[:password] password = params[:password]
platform = (params[:platform] || 'forge')&.gsub(/\s+/, "") platform = (params[:platform] || 'forge')&.gsub(/\s+/, "")
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
result = autologin_register(username, email, password, platform) result = autologin_register(username, email, password, platform, phone)
if result[:message].blank? if result[:message].blank?
render_ok({user: result[:user]}) render_ok({user: result[:user]})
else else
@ -143,7 +145,8 @@ class AccountsController < ApplicationController
user = Users::RegisterService.call(register_params) user = Users::RegisterService.call(register_params)
user.mail = "#{user.login}@example.org" if user.mail.blank? user.mail = "#{user.login}@example.org" if user.mail.blank?
password = register_params[:password].strip password = decrypt(register_params[:password]) rescue register_params[:password].to_s
password = password.strip
# gitea用户注册, email, username, password # gitea用户注册, email, username, password
interactor = Gitea::RegisterInteractor.call({username: user.login, email: user.mail, password: password}) interactor = Gitea::RegisterInteractor.call({username: user.login, email: user.mail, password: password})
@ -193,20 +196,21 @@ class AccountsController < ApplicationController
# 用户登录 # 用户登录
def login def login
Users::LoginForm.new(login_params).validate! password = decrypt(login_params[:password]) rescue login_params[:password].to_s
@user = User.try_to_login(params[:login], params[:password]) Users::LoginForm.new(login_params.merge!({password: password})).validate!
@user = User.try_to_login(params[:login], password)
return normal_status(-2, "错误的账号或密码") if @user.blank? return normal_status(-2, "错误的账号或密码") if @user.blank?
# user is already in local database # user is already in local database
return normal_status(-2, "违反平台使用规范,账号已被锁定") if @user.locked? return normal_status(-2, "违反平台使用规范,账号已被锁定") if @user.locked?
login_control = LimitForbidControl::UserLogin.new(@user) login_control = LimitForbidControl::UserLogin.new(@user)
return normal_status(-2, "登录密码出错已达上限,账号已被锁定, #{login_control.forbid_expires/60}分钟后重新登录或找回密码") if login_control.forbid? return normal_status(-2, "登录密码出错已达上限,账号已被锁定#{login_control.forbid_expires/60}分钟后重新登录或找回密码") if login_control.forbid?
password_ok = @user.check_password?(params[:password].to_s) password_ok = @user.check_password?(password.to_s)
unless password_ok unless password_ok
if login_control.remain_times-1 == 0 if login_control.remain_times-1 == 0
normal_status(-2, "登录密码出错已达上限,账号已被锁定, #{login_control.forbid_expires/60}分钟后重新登录或找回密码") normal_status(-2, "登录密码出错已达上限,账号已被锁定#{login_control.forbid_expires/60}分钟后重新登录或找回密码")
else else
normal_status(-2, "你已经输错密码#{login_control.error_times+1}次,还剩余#{login_control.remain_times-1}次机会") normal_status(-2, "你已经输错密码#{login_control.error_times+1}次,还剩余#{login_control.remain_times-1}次机会")
end end
@ -216,19 +220,24 @@ class AccountsController < ApplicationController
LimitForbidControl::UserLogin.new(@user).clear LimitForbidControl::UserLogin.new(@user).clear
successful_authentication(@user) successful_authentication(@user)
sync_pwd_to_gitea!(@user, {password: params[:password].to_s}) # TODO用户密码未同步 sync_pwd_to_gitea!(@user, {password: password.to_s}) # TODO用户密码未同步
# session[:user_id] = @user.id # session[:user_id] = @user.id
end end
def change_password def change_password
password = decrypt(params[:password]) rescue params[:password].to_s
new_password_repeat = decrypt(params[:new_password_repeat]) rescue params[:new_password_repeat].to_s
old_password = decrypt(params[:old_password]) rescue params[:old_password]
return render_error("两次输入的密码不一致") if password.to_s != new_password_repeat.to_s
@user = User.find_by(login: params[:login]) @user = User.find_by(login: params[:login])
return render_forbidden unless User.current.login == @user&.login
return render_error("此用户禁止修改密码!") if @user.id.to_i === 104691 return render_error("此用户禁止修改密码!") if @user.id.to_i === 104691
return render_error("未找到相关用户!") if @user.blank? return render_error("未找到相关用户!") if @user.blank?
return render_error("旧密码不正确") unless @user.check_password?(params[:old_password]) return render_error("旧密码不正确") unless @user.check_password?(old_password)
sync_params = { sync_params = {
password: params[:password].to_s, password: password.to_s,
email: @user.mail, email: @user.mail,
login_name: @user.name, login_name: @user.name,
source_id: 0 source_id: 0
@ -236,7 +245,7 @@ class AccountsController < ApplicationController
interactor = Gitea::User::UpdateInteractor.call(@user.login, sync_params) interactor = Gitea::User::UpdateInteractor.call(@user.login, sync_params)
if interactor.success? if interactor.success?
@user.update_attribute(:password, params[:password]) @user.update_attribute(:password, password)
render_ok render_ok
else else
render_error(interactor.error) render_error(interactor.error)

View File

@ -0,0 +1,75 @@
class Action::NodeInputsController < ApplicationController
before_action :require_admin, except: [:index]
before_action :find_action_node
def index
@node_inputs = @node.action_node_inputs
respond_to do |format|
format.html
format.json{ render_ok(data: @node_inputs.as_json) }
end
end
def create
@node_input = Action::NodeInput.new(node_input_params)
@node_input.action_node = @node
respond_to do |format|
if @node_input.save
format.html { redirect_to action_node_node_inputs_path(@node), notice: '创建成功.' }
format.json { render_ok(data: @node_input.as_json) }
else
format.html { render :new }
format.json { render json: @node_input.errors, status: -1 }
end
end
end
def new
end
def show
end
def edit
end
def update
@node_input.update(node_input_params)
respond_to do |format|
format.html { redirect_to action_node_node_inputs_path(@node), notice: '更新成功.' }
format.json { render_ok(data: @node_input.as_json) }
end
end
def destroy
if @node_input.destroy!
flash[:success] = '删除成功'
else
flash[:danger] = '删除失败'
end
redirect_to "api/actions/nodes"
end
private
def find_action_node
@node = Action::Node.find(params[:node_id])
if params[:id].present?
@node_input = @node.action_node_inputs.find(params[:id])
else
@node_input = Action::NodeInput.new
end
end
def node_input_params
if params.require(:action_node_input)
params.require(:action_node_input).permit(:name, :input_type, :description, :is_required, :sort_no, :default_value)
else
params.permit(:name, :input_type, :description, :is_required, :sort_no, :default_value)
end
end
end

View File

@ -0,0 +1,76 @@
class Action::NodeSelectsController < ApplicationController
before_action :require_admin, except: [:index]
before_action :find_action_node
def index
@node_selects = @node.action_node_selects
respond_to do |format|
format.html
format.json
end
end
def create
@node_select = Action::NodeSelect.new(node_select_params)
@node_select.action_node = @node
respond_to do |format|
if @node_select.save
format.html { redirect_to action_node_node_selects_path(@node), notice: '创建成功.' }
format.json { render_ok(data: @node_select.as_json) }
else
format.html { render :new }
format.json { render json: @node_select.errors, status: -1 }
end
end
end
def new
end
def show
end
def edit
end
def update
@node_select.update(node_select_params)
respond_to do |format|
format.html { redirect_to action_node_node_selects_path(@node), notice: '更新成功.' }
format.json { render_ok(data: @node_select.as_json) }
end
end
def destroy
if @node_select.destroy!
flash[:success] = '删除成功'
else
flash[:danger] = '删除失败'
end
redirect_to "api/actions/nodes"
end
private
def find_action_node
@node = Action::Node.find(params[:node_id])
if params[:id].present?
@node_select = @node.action_node_selects.find(params[:id])
else
@node_select = Action::NodeSelect.new
end
end
def node_select_params
if params.require(:action_node_select)
params.require(:action_node_select).permit(:name, :val, :val_ext, :description, :sort_no)
else
params.permit(:name, :val, :val_ext, :description, :sort_no)
end
end
end

View File

@ -0,0 +1,74 @@
class Action::NodeTypesController < ApplicationController
before_action :require_admin, except: [:index]
before_action :find_node_type, except: [:index, :create, :new]
def index
@node_types = Action::NodeType.all
respond_to do |format|
format.html
format.json { render_ok(data: @node_types.as_json) }
end
end
def create
@node_type = Action::NodeType.new(node_types_params)
respond_to do |format|
if @node_type.save
format.html { redirect_to action_node_types_path, notice: '创建成功.' }
format.json { render_ok(data: @node_type.as_json) }
else
format.html { render :new }
format.json { render json: @node_type.errors, status: -1 }
end
end
end
def show
respond_to do |format|
format.html
format.json { render_ok(data: @node_type.as_json) }
end
end
def new
@node_type = Action::NodeType.new
end
def edit
end
def update
@node_type.update(node_types_params)
respond_to do |format|
format.html { redirect_to action_node_types_path, notice: '更新成功.' }
format.json { render_ok(data: @node_type.as_json) }
end
end
def destroy
if @node_type.destroy!
flash[:success] = '删除成功'
else
flash[:danger] = '删除失败'
end
respond_to do |format|
format.html { redirect_to action_node_types_path }
format.json { render_ok }
end
end
private
def find_node_type
@node_type = Action::NodeType.find(params[:id])
end
def node_types_params
if params.require(:action_node_type)
params.require(:action_node_type).permit(:name, :description, :sort_no)
else
params.permit(:name, :description, :sort_no)
end
end
end

View File

@ -0,0 +1,87 @@
class Action::NodesController < ApplicationController
# before_action :require_admin, except: [:index]
before_action :require_login
before_action :find_action_node, except: [:index, :create, :new]
def index
@node_types = Action::NodeType.all
no_node_type = Action::NodeType.find_by(name: "未分类")
@no_type_nodes = Action::Node.where(action_node_types_id: nil)
@no_type_nodes = Action::Node.where(action_node_types_id: nil).or(Action::Node.where(action_node_types_id: no_node_type.id)) if no_node_type.present?
respond_to do |format|
format.html { @nodes = Action::Node.where("name LIKE :search OR full_name LIKE :search", :search => "%#{params[:search]}%") }
format.json
end
end
def create
@node = Action::Node.new(node_params)
if params.require(:node).present? && params.require(:node)[:link_type_array].present?
@node.link_type = (params.require(:node)[:link_type_array] - [""]).join(",")
end
@node.user_id = current_user.id
respond_to do |format|
if @node.save
format.html { redirect_to action_nodes_path, notice: '创建成功.' }
format.json { render_ok(data: @node.as_json) }
else
format.html { render :new }
format.json { render json: @node.errors, status: -1 }
end
end
end
def new
@node = Action::Node.new
end
def show
end
def edit
if @node.link_type.present?
@node.link_type_array = @node.link_type.to_s.split(",")
end
end
def update
if params.require(:node).present? && params.require(:node)[:link_type_array].present?
@node.link_type = (params.require(:node)[:link_type_array] - [""]).join(",")
end
@node.user_id = current_user.id if @node.user_id.blank?
@node.update(node_params)
respond_to do |format|
format.html { redirect_to action_nodes_path, notice: '更新成功.' }
format.json { render_ok(data: @node.as_json) }
end
end
def destroy
if @node.destroy!
flash[:success] = '删除成功'
else
flash[:danger] = '删除失败'
end
respond_to do |format|
format.html { redirect_to action_nodes_path }
format.json { render_ok() }
end
end
private
def find_action_node
@node = Action::Node.find(params[:id])
end
def node_params
if params.require(:action_node)
params.require(:action_node).permit(:name, :label, :full_name, :description, :icon, :action_node_types_id,
:is_local, :local_url, :yaml, :sort_no, :node_type, :is_mutil_link, :link_type, :link_type_array)
else
params.permit(:name, :label, :full_name, :description, :icon, :action_node_types_id, :is_local, :local_url,
:yaml, :sort_no, :node_type, :is_mutil_link, :link_type, :link_type_array)
end
end
end

View File

@ -0,0 +1,71 @@
class Action::TemplatesController < ApplicationController
before_action :require_admin, except: [:index]
before_action :find_action_template, except: [:index, :create, :new]
def index
@templates = Action::Template.all
respond_to do |format|
format.html
format.json
end
end
def create
@template = Action::Template.new(templates_params)
respond_to do |format|
if @template.save
format.html { redirect_to action_templates_path, notice: '创建成功.' }
format.json { render_ok(data: @template.as_json) }
else
format.html { render :new }
format.json { render json: @template.errors, status: -1 }
end
end
end
def show
end
def new
@template = Action::Template.new
end
def edit
end
def update
@template.update(templates_params)
respond_to do |format|
format.html { redirect_to action_templates_path, notice: '更新成功.' }
format.json { render_ok(data: @template.as_json) }
end
end
def destroy
if @template.destroy!
flash[:success] = '删除成功'
else
flash[:danger] = '删除失败'
end
respond_to do |format|
format.html { redirect_to action_templates_path }
format.json { render_ok }
end
end
private
def find_action_template
@template = Action::Template.find(params[:id])
end
def templates_params
if params.require(:action_template)
params.require(:action_template).permit(:name, :description, :img, :sort_no, :json, :yaml)
else
params.permit(:name, :description, :img, :sort_no, :json, :yaml)
end
end
end

View File

@ -23,10 +23,23 @@ class Admins::BaseController < ApplicationController
def require_admin! def require_admin!
return if current_user.blank? || !current_user.logged? return if current_user.blank? || !current_user.logged?
return if current_user.admin_or_business? return if current_user.admin_or_business?
return if current_user.admin_or_glcc_admin?
render_forbidden render_forbidden
end end
def require_admin
render_forbidden unless User.current.admin?
end
def require_business
render_forbidden unless admin_or_business?
end
def require_glcc_admin
render_forbidden unless admin_or_glcc_admin?
end
# 触发after ajax render partial hooks执行一些因为局部刷新后失效的绑定事件 # 触发after ajax render partial hooks执行一些因为局部刷新后失效的绑定事件
def rebind_event_if_ajax_render_partial def rebind_event_if_ajax_render_partial
return if request.format.symbol != :js return if request.format.symbol != :js

View File

@ -1,9 +1,13 @@
class Admins::DashboardsController < Admins::BaseController class Admins::DashboardsController < Admins::BaseController
def index def index
# 查询优化
week_greater_id = CommitLog.where(created_at: current_week).limit(1)[0]&.id
#月份统计还需要优化
month_greater_id = CommitLog.where(created_at: current_month).limit(1)[0]&.id
# 用户活跃数 # 用户活跃数
day_user_ids = CommitLog.where(created_at: today).pluck(:user_id).uniq day_user_ids = CommitLog.where(created_at: today).pluck(:user_id).uniq
weekly_user_ids = CommitLog.where(created_at: current_week).pluck(:user_id).uniq weekly_user_ids = CommitLog.where(created_at: current_week).where("id>= ?", week_greater_id).distinct.pluck(:user_id)
month_user_ids = CommitLog.where(created_at: current_month).pluck(:user_id).uniq month_user_ids = CommitLog.where(created_at: current_month).where("id>= ?", month_greater_id).distinct.pluck(:user_id)
@active_user_count = User.where(last_login_on: today).or(User.where(id: day_user_ids)).count @active_user_count = User.where(last_login_on: today).or(User.where(id: day_user_ids)).count
@weekly_active_user_count = User.where(last_login_on: current_week).or(User.where(id: weekly_user_ids)).count @weekly_active_user_count = User.where(last_login_on: current_week).or(User.where(id: weekly_user_ids)).count
@month_active_user_count = User.where(last_login_on: current_month).or(User.where(id: month_user_ids)).count @month_active_user_count = User.where(last_login_on: current_month).or(User.where(id: month_user_ids)).count
@ -18,16 +22,78 @@ class Admins::DashboardsController < Admins::BaseController
# 活跃项目数 # 活跃项目数
day_project_ids = (CommitLog.where(created_at: today).pluck(:project_id).uniq + Issue.where(created_on: today).pluck(:project_id).uniq).uniq day_project_ids = (CommitLog.where(created_at: today).pluck(:project_id).uniq + Issue.where(created_on: today).pluck(:project_id).uniq).uniq
weekly_project_ids = (CommitLog.where(created_at: current_week).pluck(:project_id).uniq + Issue.where(created_on: current_week).pluck(:project_id).uniq).uniq weekly_project_ids = (CommitLog.where(created_at: current_week).where("id>= ?", week_greater_id).distinct.pluck(:project_id) + Issue.where(created_on: current_week).pluck(:project_id).uniq).uniq
month_project_ids = (CommitLog.where(created_at: current_month).pluck(:project_id).uniq + Issue.where(created_on: current_month).pluck(:project_id).uniq).uniq month_project_ids = (CommitLog.where(created_at: current_month).where("id>= ?", month_greater_id).distinct.pluck(:project_id) + Issue.where(created_on: current_month).pluck(:project_id).uniq).uniq
@day_active_project_count = Project.where(updated_on: today).or(Project.where(id: day_project_ids)).count @day_active_project_count = Project.where(updated_on: today).or(Project.where(id: day_project_ids)).count
@weekly_active_project_count = Project.where(updated_on: current_week).or(Project.where(id: weekly_project_ids)).count @weekly_active_project_count = Rails.cache.fetch("dashboardscontroller:weekly_active_project_count", expires_in: 10.minutes) do
@month_active_project_count = Project.where(updated_on: current_month).or(Project.where(id: month_project_ids)).count Project.where(updated_on: current_week).or(Project.where(id: weekly_project_ids)).count
end
@month_active_project_count = Rails.cache.fetch("dashboardscontroller:month_active_project_count", expires_in: 1.hours) do
Project.where(updated_on: current_month).or(Project.where(id: month_project_ids)).count
end
# 新增项目数 # 新增项目数
@day_new_project_count = Project.where(created_on: today).count @day_new_project_count = Rails.cache.fetch("dashboardscontroller:day_new_project_count", expires_in: 10.minutes) do
@weekly_new_project_count = Project.where(created_on: current_week).count Project.where(created_on: today).count
@month_new_project_count = Project.where(created_on: current_month).count end
@weekly_new_project_count = Rails.cache.fetch("dashboardscontroller:weekly_new_project_count", expires_in: 10.minutes) do
Project.where(created_on: current_week).count
end
@month_new_project_count = Rails.cache.fetch("dashboardscontroller:month_new_project_count", expires_in: 1.hours) do
Project.where(created_on: current_month).count
end
# 总的平台用户数
# 总的平台项目数
# 总的平台组织数
# 总的平台Issue数、评论数、PR数、Commit数
@user_count = Rails.cache.fetch("dashboardscontroller:platform:user_count", expires_in: 1.days) do
User.count
end
@project_count = Rails.cache.fetch("dashboardscontroller:platform:project_count", expires_in: 1.days) do
Project.count
end
@organization_count = Rails.cache.fetch("dashboardscontroller:platform:organization_count", expires_in: 1.days) do
Organization.count
end
@issue_count = Rails.cache.fetch("dashboardscontroller:platform:issue_count", expires_in: 1.days) do
Issue.count
end
@comment_count = Rails.cache.fetch("dashboardscontroller:platform:comment_count", expires_in: 1.days) do
Journal.count
end
@pr_count = Rails.cache.fetch("dashboardscontroller:platform:pr_count", expires_in: 1.days) do
PullRequest.count
end
@commit_count = Rails.cache.fetch("dashboardscontroller:platform:commit_count", expires_in: 1.days) do
CommitLog.count
end
@subject_name = ["用户数", "项目数", "组织数", "Issue数", "Issue评论数", "PR数", "Commit数"]
@subject_icon = ["fa-user","fa-git", "fa-sitemap", "fa-warning", "fa-comments", "fa-share-alt", "fa-upload"]
@subject_data = [@user_count, @project_count, @organization_count, @issue_count, @comment_count, @pr_count, @commit_count]
if EduSetting.get("open_baidu_tongji").to_s == "true"
tongji_service = Baidu::TongjiService.new
@access_token = tongji_service.access_token
Rails.logger.info "baidu_tongji_auth access_token ===== #{@access_token}"
# @overview_data = tongji_service.api_overview
last_date = DailyPlatformStatistic.order(:date).last || Time.now
start_date = last_date.date
end_date = Time.now
if @access_token.present?
@overview_data = Rails.cache.fetch("dashboardscontroller:baidu_tongji:overview_data", expires_in: 10.minutes) do
tongji_service.source_from_batch_add(start_date, end_date)
@overview_data = tongji_service.overview_batch_add(start_date, end_date)
@overview_data
end
end
@current_week_statistic = DailyPlatformStatistic.where(date: current_week)
@pre_week_statistic = DailyPlatformStatistic.where(date: pre_week)
end
end end
def month_active_user def month_active_user
@ -42,6 +108,19 @@ class Admins::DashboardsController < Admins::BaseController
render_ok(data: data) render_ok(data: data)
end end
def baidu_tongji
tongji_service = Baidu::TongjiService.new
redirect_to tongji_service.code_url
end
def baidu_tongji_auth
if params[:code].present?
tongji_service = Baidu::TongjiService.new
tongji_service.get_access_token(params[:code])
end
redirect_to "/admins/"
end
def evaluate def evaluate
names = [] names = []
data = [] data = []
@ -63,8 +142,12 @@ class Admins::DashboardsController < Admins::BaseController
Time.now.beginning_of_day..Time.now.end_of_day Time.now.beginning_of_day..Time.now.end_of_day
end end
def current_week def pre_7_days
7.days.ago.end_of_day..Time.now.end_of_day 7.days.ago.end_of_day..Time.now.end_of_day
end
def current_week
Time.now.beginning_of_week..Time.now.end_of_day
end end
def current_month def current_month
@ -72,6 +155,7 @@ class Admins::DashboardsController < Admins::BaseController
end end
def pre_week def pre_week
14.days.ago.end_of_day..7.days.ago.end_of_day # 14.days.ago.end_of_day..7.days.ago.end_of_day
Time.now.prev_week..Time.now.prev_week.end_of_week
end end
end end

View File

@ -1,4 +1,5 @@
class Admins::EduSettingsController < Admins::BaseController class Admins::EduSettingsController < Admins::BaseController
before_action :require_admin
before_action :find_setting, only: [:edit,:update, :destroy] before_action :find_setting, only: [:edit,:update, :destroy]
def index def index

View File

@ -1,4 +1,5 @@
class Admins::FaqsController < Admins::BaseController class Admins::FaqsController < Admins::BaseController
before_action :require_business
before_action :find_faq, only: [:edit,:update, :destroy] before_action :find_faq, only: [:edit,:update, :destroy]
def index def index

View File

@ -1,4 +1,5 @@
class Admins::FeedbacksController < Admins::BaseController class Admins::FeedbacksController < Admins::BaseController
before_action :require_business
before_action :get_feedback, only: [:new_history, :create_history, :destroy] before_action :get_feedback, only: [:new_history, :create_history, :destroy]
def index def index

View File

@ -1,4 +1,6 @@
class Admins::GlccPrCheckController < Admins::BaseController class Admins::GlccPrCheckController < Admins::BaseController
before_action :require_glcc_admin
def index def index
params[:sort_by] = params[:sort_by].presence || 'created_on' params[:sort_by] = params[:sort_by].presence || 'created_on'
params[:sort_direction] = params[:sort_direction].presence || 'desc' params[:sort_direction] = params[:sort_direction].presence || 'desc'

View File

@ -1,4 +1,5 @@
class Admins::IdentityVerificationsController < Admins::BaseController class Admins::IdentityVerificationsController < Admins::BaseController
before_action :require_business
before_action :finder_identity_verification, except: [:index] before_action :finder_identity_verification, except: [:index]
def index def index
params[:sort_by] = params[:sort_by].presence || 'created_at' params[:sort_by] = params[:sort_by].presence || 'created_at'
@ -14,12 +15,14 @@ class Admins::IdentityVerificationsController < Admins::BaseController
end end
def update def update
if @identity_verification.update(update_params) if update_params[:state] == "已拒绝" && update_params[:description].blank?
flash[:danger] = '拒绝理由不能为空'
render 'edit'
else
UserAction.create(action_id: @identity_verification.id, action_type: "UpdateIdentityVerifications", user_id: current_user.id, :ip => request.remote_ip, data_bank: @identity_verification.attributes.to_json)
@identity_verification.update(update_params)
redirect_to admins_identity_verifications_path redirect_to admins_identity_verifications_path
flash[:success] = "更新成功" flash[:success] = "更新成功"
else
redirect_to admins_identity_verifications_path
flash[:danger] = "更新失败"
end end
end end

View File

@ -0,0 +1,30 @@
class Admins::IssuesRankController < Admins::BaseController
before_action :require_admin
def index
@statistics = DailyProjectStatistic.where('date >= ? AND date <= ?', begin_date, end_date)
@statistics = @statistics.group(:project_id).joins(:project).select("project_id,
sum(issues) as issues,
sum(closed_issues) as closed_issues,
projects.issues_count as issues_count")
@statistics = @statistics.order("#{sort_by} #{sort_direction}").limit(50)
end
private
def begin_date
params.fetch(:begin_date, (Date.yesterday-7.days).to_s)
end
def end_date
params.fetch(:end_date, Date.yesterday.to_s)
end
def sort_by
DailyProjectStatistic.column_names.include?(params.fetch(:sort_by, "issues")) ? params.fetch(:sort_by, "issues") : "issues"
end
def sort_direction
%w(desc asc).include?(params.fetch(:sort_direction, "desc")) ? params.fetch(:sort_direction, "desc") : "desc"
end
end

View File

@ -1,4 +1,5 @@
class Admins::LaboratoriesController < Admins::BaseController class Admins::LaboratoriesController < Admins::BaseController
before_action :require_admin
def index def index
default_sort('id', 'desc') default_sort('id', 'desc')

View File

@ -1,4 +1,5 @@
class Admins::MessageTemplatesController < Admins::BaseController class Admins::MessageTemplatesController < Admins::BaseController
before_action :require_admin
before_action :get_template, only: [:edit, :update, :destroy] before_action :get_template, only: [:edit, :update, :destroy]
def index def index
@ -7,12 +8,12 @@ class Admins::MessageTemplatesController < Admins::BaseController
end end
def new def new
@message_template = MessageTemplate.new @message_template = MessageTemplate::CustomTip.new
end end
def create def create
@message_template = MessageTemplate::CustomTip.new(message_template_params) @message_template = MessageTemplate::CustomTip.new
@message_template.type = "MessageTemplate::CustomTip" @message_template.attributes = message_template_params
if @message_template.save! if @message_template.save!
redirect_to admins_message_templates_path redirect_to admins_message_templates_path
flash[:success] = "创建消息模板成功" flash[:success] = "创建消息模板成功"
@ -47,9 +48,7 @@ class Admins::MessageTemplatesController < Admins::BaseController
private private
def message_template_params def message_template_params
# type = @message_template.present? ? @message_template.type : "MessageTemplate::CustomTip" params.require(@message_template.type.split("::").join("_").underscore.to_sym).permit!
# params.require(type.split("::").join("_").underscore.to_sym).permit!
params.require(:message_template_custom_tip).permit!
end end
def get_template def get_template

View File

@ -1,7 +1,8 @@
class Admins::NpsController < Admins::BaseController class Admins::NpsController < Admins::BaseController
before_action :require_business
def index def index
@on_off_switch = EduSetting.get("nps-on-off-switch").to_s == 'true' @on_off_switch = EduSetting.get("nps-on-off-switch").to_s == 'true'
@user_nps = UserNp.joins(:user).order(created_at: :desc) @user_nps = UserNp.order(created_at: :desc)
keyword = params[:keyword].to_s.strip.presence keyword = params[:keyword].to_s.strip.presence
if keyword if keyword
sql = 'CONCAT(users.lastname, users.firstname) LIKE :keyword OR users.nickname LIKE :keyword OR users.login LIKE :keyword OR users.mail LIKE :keyword OR users.phone LIKE :keyword' sql = 'CONCAT(users.lastname, users.firstname) LIKE :keyword OR users.nickname LIKE :keyword OR users.login LIKE :keyword OR users.mail LIKE :keyword OR users.phone LIKE :keyword'

View File

@ -1,5 +1,6 @@
class Admins::OrganizationsController < Admins::BaseController class Admins::OrganizationsController < Admins::BaseController
before_action :finder_org, except: [:index] before_action :require_admin
before_action :finder_org, except: [:index]
def index def index
params[:sort_by] = params[:sort_by].presence || 'created_on' params[:sort_by] = params[:sort_by].presence || 'created_on'

View File

@ -1,4 +1,5 @@
class Admins::PageThemesController < Admins::BaseController class Admins::PageThemesController < Admins::BaseController
before_action :require_admin
before_action :finder_page_theme, only: [:edit, :update, :destroy] before_action :finder_page_theme, only: [:edit, :update, :destroy]
def index def index

View File

@ -1,4 +1,5 @@
class Admins::ProjectCategoriesController < Admins::BaseController class Admins::ProjectCategoriesController < Admins::BaseController
before_action :require_admin
before_action :get_category, only: [:edit,:update, :destroy] before_action :get_category, only: [:edit,:update, :destroy]
before_action :validate_names, only: [:create, :update] before_action :validate_names, only: [:create, :update]

View File

@ -1,4 +1,5 @@
class Admins::ProjectIgnoresController < Admins::BaseController class Admins::ProjectIgnoresController < Admins::BaseController
before_action :require_admin
before_action :set_ignore, only: [:edit,:update, :destroy,:show] before_action :set_ignore, only: [:edit,:update, :destroy,:show]
# before_action :validate_params, only: [:create, :update] # before_action :validate_params, only: [:create, :update]

View File

@ -1,4 +1,5 @@
class Admins::ProjectLanguagesController < Admins::BaseController class Admins::ProjectLanguagesController < Admins::BaseController
before_action :require_admin
before_action :get_language, only: [:edit,:update, :destroy] before_action :get_language, only: [:edit,:update, :destroy]
before_action :validate_names, only: [:create, :update] before_action :validate_names, only: [:create, :update]

View File

@ -1,4 +1,5 @@
class Admins::ProjectLicensesController < Admins::BaseController class Admins::ProjectLicensesController < Admins::BaseController
before_action :require_admin
before_action :set_license, only: [:edit,:update, :destroy,:show] before_action :set_license, only: [:edit,:update, :destroy,:show]
# before_action :validate_params, only: [:create, :update] # before_action :validate_params, only: [:create, :update]
@ -6,7 +7,7 @@ class Admins::ProjectLicensesController < Admins::BaseController
sort_by = License.column_names.include?(params[:sort_by]) ? params[:sort_by] : 'created_at' sort_by = License.column_names.include?(params[:sort_by]) ? params[:sort_by] : 'created_at'
sort_direction = %w(desc asc).include?(params[:sort_direction]) ? params[:sort_direction] : 'desc' sort_direction = %w(desc asc).include?(params[:sort_direction]) ? params[:sort_direction] : 'desc'
q = License.ransack(name_cont: params[:search]) q = License.ransack(name_cont: params[:search])
project_licenses = q.result(distinct: true).order("#{sort_by} #{sort_direction}") project_licenses = q.result(distinct: true).reorder("#{sort_by} #{sort_direction}")
@project_licenses = paginate(project_licenses) @project_licenses = paginate(project_licenses)
end end
@ -95,7 +96,7 @@ class Admins::ProjectLicensesController < Admins::BaseController
end end
def license_params def license_params
params.require(:license).permit(:name,:content) params.require(:license).permit(:name,:content,:position)
end end
# def validate_params # def validate_params

View File

@ -1,11 +1,22 @@
class Admins::ProjectsController < Admins::BaseController class Admins::ProjectsController < Admins::BaseController
before_action :require_admin
before_action :find_project, only: [:edit, :update] before_action :find_project, only: [:edit, :update]
def index def index
sort_by = Project.column_names.include?(params[:sort_by]) ? params[:sort_by] : 'created_on' sort_by = Project.column_names.include?(params[:sort_by]) ? params[:sort_by] : 'created_on'
sort_direction = %w(desc asc).include?(params[:sort_direction]) ? params[:sort_direction] : 'desc' sort_direction = %w(desc asc).include?(params[:sort_direction]) ? params[:sort_direction] : 'desc'
search = params[:search].to_s.strip search = params[:search].to_s.strip
projects = Project.where("name like ?", "%#{search}%").order("#{sort_by} #{sort_direction}") projects = Project.where("id = ? OR name like ? OR identifier LIKE ?", search, "%#{search}%", "%#{search}%").order("#{sort_by} #{sort_direction}")
case params[:category]
when 'public'
projects = projects.where(is_public: true)
when 'private'
projects = projects.where(is_public: false)
when 'fork'
projects = projects.where.not(forked_from_project_id: nil)
when 'original'
projects = projects.where(forked_from_project_id: nil, project_type: 'common')
end
@projects = paginate projects.includes(:owner, :members, :issues, :versions, :attachments, :project_score) @projects = paginate projects.includes(:owner, :members, :issues, :versions, :attachments, :project_score)
end end
@ -32,8 +43,12 @@ class Admins::ProjectsController < Admins::BaseController
def destroy def destroy
project = Project.find_by!(id: params[:id]) project = Project.find_by!(id: params[:id])
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
Gitea::Repository::DeleteService.new(project.owner, project.identifier).call close_fork_pull_requests_by(project)
Gitea::Repository::DeleteService.new(project.owner, project.identifier, current_user.gitea_token).call
project.destroy! project.destroy!
project.forked_projects.update_all(forked_from_project_id: nil)
# 如果该项目有所属的项目分类以及为私有项目,需要更新对应数量
project.project_category.decrement!(:private_projects_count, 1) if project.project_category.present? && !project.is_public
# render_delete_success # render_delete_success
UserAction.create(action_id: project.id, action_type: "DestroyProject", user_id: current_user.id, :ip => request.remote_ip, data_bank: project.attributes.to_json) UserAction.create(action_id: project.id, action_type: "DestroyProject", user_id: current_user.id, :ip => request.remote_ip, data_bank: project.attributes.to_json)
redirect_to admins_projects_path redirect_to admins_projects_path
@ -52,4 +67,19 @@ class Admins::ProjectsController < Admins::BaseController
def project_update_params def project_update_params
params.require(:project).permit(:is_pinned, :recommend, :recommend_index) params.require(:project).permit(:is_pinned, :recommend, :recommend_index)
end end
def close_fork_pull_requests_by(project)
open_pull_requests = PullRequest.where(fork_project_id: project.id)
if open_pull_requests.present?
open_pull_requests.each do |pull_request|
closed = PullRequests::CloseService.call(pull_request&.project.owner, pull_request&.project.repository, pull_request, current_user)
if closed === true
pull_request.project_trends.create!(user: current_user, project: pull_request&.project,action_type: ProjectTrend::CLOSE)
# 合并请求下issue处理为关闭
pull_request.issue&.update_attributes!({status_id:5})
SendTemplateMessageJob.perform_later('PullRequestClosed', current_user.id, pull_request.id) if Site.has_notice_menu?
end
end
end
end
end end

View File

@ -1,16 +1,60 @@
class Admins::ProjectsRankController < Admins::BaseController class Admins::ProjectsRankController < Admins::BaseController
before_action :require_admin
def index def index
@rank_date = rank_date @statistics = DailyProjectStatistic.where("date >= ? AND date <= ?", begin_date, end_date)
deleted_data = $redis_cache.smembers("v2-project-rank-deleted") @statistics = @statistics.group(:project_id).select("project_id,
$redis_cache.zrem("v2-project-rank-#{rank_date}", deleted_data) unless deleted_data.blank? sum(score) as score,
@date_rank = $redis_cache.zrevrange("v2-project-rank-#{rank_date}", 0, -1, withscores: true) sum(visits) as visits,
sum(watchers) as watchers,
sum(praises) as praises,
sum(forks) as forks,
sum(issues) as issues,
sum(pullrequests) as pullrequests,
sum(commits) as commits").includes(:project)
@statistics = paginate @statistics.order("#{sort_by} #{sort_direction}")
export_excel(@statistics.limit(50))
end end
private private
def rank_date def begin_date
params.fetch(:date, Date.today.to_s) params.fetch(:begin_date, (Date.yesterday-7.days).to_s)
end
def end_date
params.fetch(:end_date, Date.yesterday.to_s)
end
def sort_by
DailyProjectStatistic.column_names.include?(params.fetch(:sort_by, "score")) ? params.fetch(:sort_by, "score") : "score"
end
def sort_direction
%w(desc asc).include?(params.fetch(:sort_direction, "desc")) ? params.fetch(:sort_direction, "desc") : "desc"
end
def export_excel(data)
book = Spreadsheet::Workbook.new
sheet = book.create_worksheet :name => "项目活跃度排行"
sheet.row(0).concat %w(排名 项目全称 项目地址 项目分类 首次创建时间 外部迁移/独立创建 得分 访问数 关注数 点赞数 fork数 疑修数 合并请求数 提交数)
data.each_with_index do |d, index|
sheet[index+1,0] = index+1
sheet[index+1,1] = "#{d&.project&.owner&.real_name}/#{d&.project&.name}"
sheet[index+1,2] = "#{Rails.application.config_for(:configuration)['platform_url']}/#{d&.project&.owner&.login}/#{d&.project&.identifier}"
sheet[index+1,3] = d&.project&.project_category&.name
sheet[index+1,4] = d&.project&.created_on.present? ? d&.project&.created_on.strftime("%Y-%m-%d %H:%M:%S") : ""
sheet[index+1,5] = d&.project&.common? ? "独立创建" : "外部迁移"
sheet[index+1,6] = d.score
sheet[index+1,7] = d.visits
sheet[index+1,8] = d.watchers
sheet[index+1,9] = d.praises
sheet[index+1,10] = d.forks
sheet[index+1,11] = d.issues
sheet[index+1,12] = d.pullrequests
sheet[index+1,13] = d.commits
end
book.write "#{Rails.root}/public/项目活跃度排行.xls"
end end
end end

View File

@ -1,4 +1,5 @@
class Admins::ReversedKeywordsController < Admins::BaseController class Admins::ReversedKeywordsController < Admins::BaseController
before_action :require_admin
before_action :get_keyword, only: [:edit,:update, :destroy] before_action :get_keyword, only: [:edit,:update, :destroy]
# before_action :validate_identifer, only: [:create, :update] # before_action :validate_identifer, only: [:create, :update]

View File

@ -1,4 +1,5 @@
class Admins::SitePagesController < Admins::BaseController class Admins::SitePagesController < Admins::BaseController
before_action :require_admin
before_action :finder_site_page, except: [:index] before_action :finder_site_page, except: [:index]
def index def index
@ -29,8 +30,12 @@ class Admins::SitePagesController < Admins::BaseController
end end
def update def update
@site_page.update(update_params) if update_params[:state] == "false" && update_params[:state_description].blank?
flash[:success] = '保存成功' flash[:danger] = '关闭站点理由不能为空'
else
@site_page.update(update_params)
flash[:success] = '保存成功'
end
render 'edit' render 'edit'
end end

View File

@ -1,4 +1,5 @@
class Admins::SitesController < Admins::BaseController class Admins::SitesController < Admins::BaseController
before_action :require_admin
before_action :find_site, only: [:edit,:update, :destroy] before_action :find_site, only: [:edit,:update, :destroy]
def index def index

View File

@ -1,4 +1,5 @@
class Admins::SystemNotificationsController < Admins::BaseController class Admins::SystemNotificationsController < Admins::BaseController
before_action :require_business
before_action :get_notification, only: [:history, :edit,:update, :destroy] before_action :get_notification, only: [:history, :edit,:update, :destroy]
# before_action :validate_identifer, only: [:create, :update] # before_action :validate_identifer, only: [:create, :update]
@ -25,7 +26,7 @@ class Admins::SystemNotificationsController < Admins::BaseController
@notification = SystemNotification.new(notification_params) @notification = SystemNotification.new(notification_params)
if @notification.save if @notification.save
redirect_to admins_system_notifications_path redirect_to admins_system_notifications_path
flash[:success] = '系统消息创建成功' flash[:success] = '系统公告创建成功'
else else
redirect_to admins_system_notifications_path redirect_to admins_system_notifications_path
flash[:danger] = @notification.errors.full_messages.join(",") flash[:danger] = @notification.errors.full_messages.join(",")
@ -37,7 +38,7 @@ class Admins::SystemNotificationsController < Admins::BaseController
if @notification.update_attributes(notification_params) if @notification.update_attributes(notification_params)
format.html do format.html do
redirect_to admins_system_notifications_path redirect_to admins_system_notifications_path
flash[:success] = '系统消息更新成功' flash[:success] = '系统公告更新成功'
end end
format.js {render_ok} format.js {render_ok}
else else
@ -53,10 +54,10 @@ class Admins::SystemNotificationsController < Admins::BaseController
def destroy def destroy
if @notification.destroy if @notification.destroy
redirect_to admins_system_notifications_path redirect_to admins_system_notifications_path
flash[:success] = "系统消息删除成功" flash[:success] = "系统公告删除成功"
else else
redirect_to admins_system_notifications_path redirect_to admins_system_notifications_path
flash[:danger] = "系统消息删除失败" flash[:danger] = "系统公告删除失败"
end end
end end

View File

@ -1,4 +1,5 @@
class Admins::Topic::ActivityForumsController < Admins::Topic::BaseController class Admins::Topic::ActivityForumsController < Admins::Topic::BaseController
before_action :require_business
before_action :find_activity_forum, only: [:edit, :update, :destroy] before_action :find_activity_forum, only: [:edit, :update, :destroy]
def index def index

View File

@ -1,4 +1,5 @@
class Admins::Topic::BannersController < Admins::Topic::BaseController class Admins::Topic::BannersController < Admins::Topic::BaseController
before_action :require_business
before_action :find_banner, only: [:edit, :update, :destroy] before_action :find_banner, only: [:edit, :update, :destroy]
def index def index

View File

@ -1,4 +1,5 @@
class Admins::Topic::CardsController < Admins::Topic::BaseController class Admins::Topic::CardsController < Admins::Topic::BaseController
before_action :require_business
before_action :find_card, only: [:edit, :update, :destroy] before_action :find_card, only: [:edit, :update, :destroy]
def index def index

View File

@ -1,4 +1,5 @@
class Admins::Topic::CooperatorsController < Admins::Topic::BaseController class Admins::Topic::CooperatorsController < Admins::Topic::BaseController
before_action :require_business
before_action :find_cooperator, only: [:edit, :update, :destroy] before_action :find_cooperator, only: [:edit, :update, :destroy]
def index def index

View File

@ -1,4 +1,5 @@
class Admins::Topic::ExcellentProjectsController < Admins::Topic::BaseController class Admins::Topic::ExcellentProjectsController < Admins::Topic::BaseController
before_action :require_business
before_action :find_excellent_project, only: [:edit, :update, :destroy] before_action :find_excellent_project, only: [:edit, :update, :destroy]
def index def index

View File

@ -1,4 +1,5 @@
class Admins::Topic::ExperienceForumsController < Admins::Topic::BaseController class Admins::Topic::ExperienceForumsController < Admins::Topic::BaseController
before_action :require_business
before_action :find_experience_forum, only: [:edit, :update, :destroy] before_action :find_experience_forum, only: [:edit, :update, :destroy]
def index def index

View File

@ -1,4 +1,5 @@
class Admins::Topic::GlccNewsController < Admins::Topic::BaseController class Admins::Topic::GlccNewsController < Admins::Topic::BaseController
before_action :require_glcc_admin
before_action :find_glcc, only: [:edit, :update, :destroy] before_action :find_glcc, only: [:edit, :update, :destroy]
def index def index

View File

@ -1,4 +1,5 @@
class Admins::Topic::PinnedForumsController < Admins::Topic::BaseController class Admins::Topic::PinnedForumsController < Admins::Topic::BaseController
before_action :require_business
before_action :find_pinned_forum, only: [:edit, :update, :destroy] before_action :find_pinned_forum, only: [:edit, :update, :destroy]
def index def index

View File

@ -0,0 +1,14 @@
class Admins::UserActionsController < Admins::BaseController
before_action :require_admin
def index
@user_actions = UserAction.order(created_at: :desc)
@user_actions = @user_actions.where(action_type: params[:action_type]) if params[:action_type].present?
keyword = params[:keyword].to_s.strip.presence
if keyword
sql = 'login LIKE :keyword OR phone LIKE :keyword OR email LIKE :keyword'
@user_actions = @user_actions.where(sql, keyword: "%#{keyword}%")
end
@user_actions = paginate @user_actions
end
end

View File

@ -1,4 +1,5 @@
class Admins::UsersController < Admins::BaseController class Admins::UsersController < Admins::BaseController
before_action :require_admin
before_action :finder_user, except: [:index] before_action :finder_user, except: [:index]
def index def index
@ -26,10 +27,30 @@ class Admins::UsersController < Admins::BaseController
def destroy def destroy
UserAction.create(action_id: @user.id, action_type: "DestroyUser", user_id: current_user.id, :ip => request.remote_ip, data_bank: @user.attributes.to_json) UserAction.create(action_id: @user.id, action_type: "DestroyUser", user_id: current_user.id, :ip => request.remote_ip, data_bank: @user.attributes.to_json)
@user.destroy! # org_ids = TeamUser.where(user_id: @user.id).pluck(:organization_id) | OrganizationUser.where(user_id: @user.id).pluck(:organization_id)
Gitea::User::DeleteService.call(@user.login) # organizations = Organization.where(id: org_ids)
# organizations.each do |org|
render_delete_success # # org.team_users.joins(:team).where(user_id: @user.id, teams: {authorize: %w(owner)})
# owner_count = org.team_users.joins(:team).where(teams: {authorize: %w(owner)}).count
# # 多个owner时,仅将用户从组织移除, 一个时直接删除
# if owner_count > 1
# org.team_users.joins(:team).where(user_id: @user.id, teams: {authorize: %w(owner)}).destroy_all
# org.organization_users.where(user_id: @user.id, organization_id: org.id).destroy_all
# else
# org.destroy
# end
# end
# @user.destroy!
# Gitea::User::DeleteService.call(@user.login, true)
#
# render_delete_success
@result_object = Api::V1::Users::DeleteUserService.call(@user)
if @result_object
render_delete_success
else
render_js_error('删除失败!')
end
end end
def lock def lock
@ -73,6 +94,6 @@ class Admins::UsersController < Admins::BaseController
def update_params def update_params
params.require(:user).permit(%i[lastname nickname gender technical_title is_shixun_marker params.require(:user).permit(%i[lastname nickname gender technical_title is_shixun_marker
mail phone location location_city school_id department_id admin mail phone location location_city school_id department_id admin
password login website_permission]) password login website_permission business glcc_admin])
end end
end end

View File

@ -1,4 +1,5 @@
class Admins::UsersRankController < Admins::BaseController class Admins::UsersRankController < Admins::BaseController
before_action :require_admin
def index def index
@rank_date = rank_date @rank_date = rank_date

View File

@ -0,0 +1,45 @@
class Api::Pm::ActionRunsController < Api::Pm::BaseController
before_action :require_login
def index
tip_exception('请输入workflows') if params[:workflows].blank?
@owner = Owner.find_by(login: params[:owner_id].to_s) || Owner.find_by(id: params[:owner_id].to_s)
tip_exception('组织未找到') if @owner.blank?
action_runs = Gitea::ActionRun.where(owner_id: @owner.gitea_uid)
group_data = action_runs.where(workflow_id: params[:workflows].to_s.split(",")).where(status: [1,2]).group(:workflow_id, :status).count
@result = []
params[:workflows].to_s.split(",").each do |file|
last_action_run = action_runs.where(workflow_id: file).order(updated: :desc).first
last_action_run_json = last_action_run.present? ? {
id: last_action_run.id,
schedule: last_action_run.schedule_id > 0,
title: last_action_run.title,
index: last_action_run.index,
status: last_action_run.status,
started: last_action_run.started,
stopped: last_action_run.stopped,
length: last_action_run.stopped - last_action_run.started,
created: last_action_run.created,
updated: last_action_run.updated,
} : {}
total = 0
success = 0
failure = 0
group_data.each do |k,v|
total += v if k[0] == file
success += v if k[0] == file && k[1] == 1
failure += v if k[0] == file && k[1] == 2
end
@result << {
name: file,
total: total,
success: success,
failure: failure
}.merge(last_action_run_json)
end
render :json => {data: @result}
end
end

View File

@ -0,0 +1,60 @@
class Api::Pm::BaseController < ApplicationController
include Api::ProjectHelper
include Api::UserHelper
include Api::PullHelper
# before_action :doorkeeper_authorize!
# skip_before_action :user_setup
protected
def kaminary_select_paginate(relation)
limit = params[:limit] || params[:per_page]
limit = (limit.to_i.zero? || limit.to_i > 200) ? 200 : limit.to_i
page = params[:page].to_i.zero? ? 1 : params[:page].to_i
relation.page(page).per(limit)
end
def limit
params.fetch(:limit, 15)
end
def page
params.fetch(:page, 1)
end
def load_project
@project = Project.find_by_id(params[:project_id]) || Project.new(id: 0, user_id: 0, name: 'pm_mm', identifier: 'pm_mm', is_public:true)
end
def load_issue
# return render_parameter_missing if params[:pm_project_id].blank?
@issue = Issue.issue_issue.find_by_id(params[:issue_id])
render_not_found('疑修不存在!') if @issue.blank?
end
# 具有对仓库的管理权限
def require_manager_above
@project = load_project
return render_forbidden if !current_user.admin? && !@project.manager?(current_user)
end
# 具有对仓库的操作权限
def require_operate_above
@project = load_project
return render_forbidden if !current_user.admin? && !@project.operator?(current_user)
end
# 具有仓库的操作权限或者fork仓库的操作权限
def require_operate_above_or_fork_project
@project = load_project
return render_forbidden if !current_user.admin? && !@project.operator?(current_user) && !(@project.fork_project.present? && @project.fork_project.operator?(current_user))
end
# 具有对仓库的访问权限
def require_public_and_member_above
@project = load_project
return render_forbidden if !@project.is_public && !current_user.admin? && !@project.member?(current_user)
end
end

View File

@ -0,0 +1,138 @@
class Api::Pm::DashboardsController < Api::Pm::BaseController
before_action :require_login
def index
end
def todo
return render_error('请输入正确的pm_project_ids.') if params[:pm_project_ids].blank?
pm_project_ids = params[:pm_project_ids].split(",") rescue []
date = params[:date].present? ? params[:date].to_date : Date.today rescue Date.today
@issues = Issue.where("start_date <= ? and due_date >= ?", date, date)
@issues = @issues.where(pm_project_id: pm_project_ids).joins(:issue_participants).where(issue_participants: {participant_id: current_user.id, participant_type: 'assigned'})
@issues = @issues.where.not(status_id: 5)
@issues = kaminari_paginate(@issues.distinct.pm_includes)
end
def my_issues
return render_error('请输入正确的pm_project_ids.') if params[:pm_project_ids].blank?
return render_error('请输入正确的pm_issue_types.') if params[:pm_issue_types].blank?
pm_project_ids = params[:pm_project_ids].split(",") rescue []
pm_issue_types = params[:pm_issue_types].split(",") rescue []
@all_issues = Issue.where(pm_project_id: pm_project_ids, pm_issue_type: pm_issue_types)
@issues = @all_issues.joins(:issue_participants).where(issue_participants: {participant_id: current_user.id, participant_type: 'assigned'})
@issues = @issues.where.not(status_id: 5) if params[:category] == "opened"
@issues = kaminari_paginate(@issues.distinct.pm_includes)
@my_assign_requirements_count = @all_issues.where(pm_issue_type: 1).joins(:issue_participants).where(issue_participants: {participant_id: current_user.id, participant_type: 'assigned'}).size
@my_assign_tasks_count = @all_issues.where(pm_issue_type: 2).joins(:issue_participants).where(issue_participants: {participant_id: current_user.id, participant_type: 'assigned'}).size
@my_assign_bugs_count = @all_issues.where(pm_issue_type: 3).joins(:issue_participants).where(issue_participants: {participant_id: current_user.id, participant_type: 'assigned'}).size
end
def my_pm_projects
return render_error('请输入正确的pm_project_id.') if params[:pm_project_id].blank?
@all_issues = Issue.where(pm_project_id: params[:pm_project_id])
time_now = Time.now
@last_week_create_issues_count = @all_issues.where("created_on > ? and created_on < ?", time_now - 7.days, time_now).size
@before_last_week_create_issue_count = @all_issues.where("created_on > ? and created_on < ?", time_now - 14.days, time_now - 7.days).size
@compare_last_week_create_issues = @before_last_week_create_issue_count.zero? ? 0 :(@last_week_create_issues_count - @before_last_week_create_issue_count).to_f / @before_last_week_create_issue_count rescue 0
@last_week_close_issues_count = @all_issues.where(status_id: 5).where("updated_on > ? and updated_on < ?", time_now - 7.days, time_now).size
@before_last_week_close_issue_count = @all_issues.where(status_id: 5).where("updated_on > ? and updated_on < ?", time_now - 14.days, time_now - 7.days).size
@compare_last_week_close_issues = @before_last_week_close_issue_count.zero? ? 0 :(@last_week_close_issues_count - @before_last_week_close_issue_count).to_f / @before_last_week_close_issue_count rescue 0
@all_requirement_issues_count = @all_issues.where(pm_issue_type: 1).size
@open_requirement_issues_count = @all_issues.where(pm_issue_type: 1).where.not(status_id: 5).size
@last_week_close_requirement_issues_count = @all_issues.where(pm_issue_type: 1).where(status_id: 5).where("updated_on > ? and updated_on < ?", time_now - 7.days, time_now).size
@last_month_close_requirement_issues_count = @all_issues.where(pm_issue_type: 1).where(status_id: 5).where("updated_on > ? and updated_on < ?", time_now - 30.days, time_now).size
@all_task_issues_count = @all_issues.where(pm_issue_type: 2).size
@open_task_issues_count = @all_issues.where(pm_issue_type: 2).where.not(status_id: 5).size
@last_week_close_tast_issues_count = @all_issues.where(pm_issue_type: 2).where(status_id: 5).where("updated_on > ? and updated_on < ?", time_now - 7.days, time_now).size
@last_month_close_task_issues_count = @all_issues.where(pm_issue_type: 2).where(status_id: 5).where("updated_on > ? and updated_on < ?", time_now - 30.days, time_now).size
@all_bug_issues_count = @all_issues.where(pm_issue_type: 3).size
@open_bug_issues_count = @all_issues.where(pm_issue_type: 3).where.not(status_id: 5).size
@last_week_close_bug_issues_count = @all_issues.where(pm_issue_type: 3).where(status_id: 5).where("updated_on > ? and updated_on < ?", time_now - 7.days, time_now).size
@last_month_close_bug_issues_count = @all_issues.where(pm_issue_type: 3).where(status_id: 5).where("updated_on > ? and updated_on < ?", time_now - 30.days, time_now).size
@requirement_close_trend = [[],[]]
@task_close_trend = [[],[]]
@bug_close_trend = [[],[]]
((time_now-29.days).to_date..time_now.to_date).to_a.each do |i|
@requirement_close_trend[0] << i.strftime("%Y.%m.%d")
@task_close_trend[0] << i.strftime("%Y.%m.%d")
@bug_close_trend[0] << i.strftime("%Y.%m.%d")
@requirement_close_trend[1] << @all_issues.where(pm_issue_type: 1, status_id: 5).where("DATE(updated_on) = ?", i).size
@task_close_trend[1] << @all_issues.where(pm_issue_type: 2, status_id: 5).where("DATE(updated_on) = ?", i).size
@bug_close_trend[1] << @all_issues.where(pm_issue_type: 3, status_id: 5).where("DATE(updated_on) = ?", i).size
end
@close_trend = {requirement: @requirement_close_trend, task: @task_close_trend, bug: @bug_close_trend}
render_ok(data: {
last_week_close_issues_count: @last_week_close_issues_count,
before_last_week_close_issue_count: @before_last_week_close_issue_count,
compare_last_week_close_issues: @compare_last_week_close_issues,
last_week_create_issues_count: @last_week_create_issues_count,
before_last_week_create_issue_count: @before_last_week_create_issue_count,
compare_last_week_create_issues: @compare_last_week_create_issues,
all_requirement_issues_count: @all_requirement_issues_count,
open_requirement_issues_count: @open_requirement_issues_count,
last_week_close_requirement_issues_count: @last_week_close_requirement_issues_count,
last_month_close_requirement_issues_count: @last_month_close_requirement_issues_count,
all_task_issues_count: @all_task_issues_count,
open_task_issues_count: @open_task_issues_count,
last_week_close_task_issues_count: @last_week_close_tast_issues_count,
last_month_close_task_issues_count: @last_month_close_task_issues_count,
all_bug_issues_count: @all_bug_issues_count,
open_bug_issues_count: @open_bug_issues_count,
last_week_close_bug_issues_count: @last_week_close_bug_issues_count,
last_month_close_bug_issues_count: @last_month_close_bug_issues_count,
close_trend: @close_trend
})
end
def my_projects
return render_error('请输入正确的project_id.') if params[:project_id].blank?
@project = Project.find_by_id params[:project_id]
return render_error('请输入正确的project_id.') unless @project.present?
time_now = Time.now
branch_tag_result = $gitea_hat_client.get_repos_branch_tag_count_by_owner_repo(@project&.owner&.login, @project&.identifier) rescue {}
languages_result = $gitea_client.get_repos_languages_by_owner_repo(@project&.owner&.login, @project&.identifier) rescue {}
@open_pull_requests_count = @project.pull_requests.opening.size
@last_week_close_pull_requests_count = @project.pull_requests.where(status: 1).where("updated_at > ? and updated_at < ?", time_now - 7.days, time_now).size
@last_month_close_pull_requets_count = @project.pull_requests.where(status: 1).where("updated_at > ? and updated_at < ?", time_now - 30.days, time_now).size
@commits_count = @project.commit_logs.size
@last_week_commits_count = @project.commit_logs.where("created_at > ? and created_at < ?", time_now - 7.days, time_now).size
@last_month_commits_count = @project.commit_logs.where("created_at > ? and created_at < ?", time_now - 30.days, time_now).size
render_ok(data: {
branch_count: branch_tag_result["branch_count"].to_i,
tag_count: branch_tag_result["tag_count"].to_i,
license_name: @project.license&.name,
open_pull_requests_count: @open_pull_requests_count,
last_week_close_pull_requests_count: @last_week_close_pull_requests_count,
last_month_close_pull_requets_count: @last_month_close_pull_requets_count,
commits_count: @commits_count,
last_week_commits_count: @last_week_commits_count,
last_month_commits_count: @last_month_commits_count,
language: hash_transform_precentagable(languages_result),
})
end
def my_operate_journals
return render_error('请输入正确的pm_project_id.') if params[:pm_project_id].blank?
@journals = Journal.operate_journals.joins(:issue).where(issues: {pm_project_id: params[:pm_project_id], pm_issue_type: [1,2,3]})
@journals = kaminari_paginate(@journals.order(updated_on: :desc))
end
private
def hash_transform_precentagable(hash)
total_byte_size = hash.values.sum
hash.transform_values { |v|
ActionController::Base.helpers
.number_to_percentage((v * 100.0 / total_byte_size), precision: 1)
}.select{|k,v| v != "0.0%"}
end
end

View File

@ -0,0 +1,46 @@
class Api::Pm::IssueLinksController < Api::Pm::BaseController
before_action :load_project
before_action :load_issue
def index
@links = PmLink.where(be_linkable_id: @issue.id,be_linkable_type: 'Issue').or(PmLink.where(linkable_id: @issue.id,linkable_type: 'Issue'))
end
def create
begin
ActiveRecord::Base.transaction do
params[:link_ids].each do |e|
@issue.pm_links.find_or_create_by!(be_linkable_type: 'Issue', be_linkable_id: e)
tag_issue = Issue.find_by_id(e)
next unless tag_issue.present?
journal = tag_issue.journals.create!({user_id: current_user.id})
journal.journal_details.create!({property: "tag_link_issue", prop_key: "1", value: @issue.id.to_s})
end
journal = @issue.journals.create!({user_id: current_user.id})
journal.journal_details.create!({property: "tag_link_issue", prop_key: "#{params[:link_ids].size}", value: params[:link_ids].join(",")})
end
render_ok
rescue
render_error('创建失败!')
end
end
def destroy
begin
ActiveRecord::Base.transaction do
@links = PmLink.where(be_linkable_id: @issue.id, be_linkable_type: 'Issue', linkable_id: params[:id], linkable_type: 'Issue').or(PmLink.where(linkable_id: @issue.id, linkable_type: 'Issue', be_linkable_id: params[:id], be_linkable_type: 'Issue'))
journal = @issue.journals.create!({user_id: current_user.id})
journal.journal_details.create!({property: "tag_link_issue", prop_key: "1", old_value: params[:id].to_s})
another_issue = Issue.find_by_id(params[:id])
if another_issue.present?
journal = another_issue.journals.create!({user_id: current_user.id})
journal.journal_details.create!({property: "tag_link_issue", prop_key: "1", old_value: @issue.id.to_s})
end
@link = @links.last
@link.destroy!
end
render_ok
rescue
render_error('删除失败!')
end
end
end

View File

@ -0,0 +1,71 @@
class Api::Pm::IssueTagsController < Api::Pm::BaseController
def index
@issue_tags = IssueTag.pm_able
if params[:organization_id].present?
IssueTag.pm_org_init_data(params[:organization_id]) unless $redis_cache.hget("pm_org_init_issue_tags", params[:organization_id])
@issue_tags = @issue_tags.where(organization_id: params[:organization_id])
end
@issue_tags = @issue_tags.where(pm_project_id: params[:pm_project_id]) if params[:pm_project_id].present?
@issue_tags = @issue_tags.ransack(name_cont: params[:keyword]).result if params[:keyword].present?
@issue_tags = @issue_tags.reorder("#{tag_sort_by} #{tag_sort_direction}")
@issue_tags = kaminari_paginate(@issue_tags)
render "api/v1/issues/issue_tags/index"
end
def create
return render_error("请输入正确的OrganizationID") unless Organization.exists?(id: issue_tag_create_params[:organization_id])
return render_error("项目标记名称不能为空!") unless issue_tag_create_params[:name].present?
@issue_tag = IssueTag.new(issue_tag_create_params.merge!(project_id: 0))
if @issue_tag.save!
render_ok
else
render_error("创建标记失败!")
end
end
before_action :load_issue_tag, only: [:update, :destroy]
def update
@issue_tag.attributes = issue_tag_update_params
if @issue_tag.save!
render_ok
else
render_error("更新标记失败!")
end
end
def destroy
if @issue_tag.destroy!
render_ok
else
render_error("删除标记失败!")
end
end
private
def tag_sort_by
sort_by = params.fetch(:sort_by, "created_at")
sort_by = IssueTag.column_names.include?(sort_by) ? sort_by : "created_at"
sort_by
end
def tag_sort_direction
sort_direction = params.fetch(:sort_direction, "desc")&.downcase
sort_direction = %w(desc asc).include?(sort_direction) ? sort_direction : "desc"
sort_direction
end
def issue_tag_create_params
params.permit(:name, :description, :color, :pm_project_id, :organization_id)
end
def issue_tag_update_params
params.permit(:name, :description, :color)
end
def load_issue_tag
@issue_tag = IssueTag.pm_able.find_by_id(params[:id])
end
end

View File

@ -0,0 +1,376 @@
class Api::Pm::IssuesController < Api::Pm::BaseController
before_action :require_login, except: [:index]
before_action :load_project
before_action :load_issue, only: %i[show update destroy link_index link_issues parent_issues]
before_action :load_issues, only: %i[batch_update batch_destroy]
before_action :check_issue_operate_permission, only: %i[update destroy]
def index
@object_result = Api::V1::Issues::ListService.call(@project, query_params, current_user)
@total_issues_count = @object_result[:total_issues_count]
@opened_issues_count = @object_result[:opened_issues_count]
@closed_issues_count = @object_result[:closed_issues_count]
@complete_issues_count = @object_result[:complete_issues_count]
if params[:only_name].present?
@issues = kaminary_select_paginate(
@object_result[:data].select(:id, :subject, :project_issues_index, :updated_on, :created_on))
else
@issues = kaminari_paginate(@object_result[:data])
end
render 'api/v1/issues/index'
end
def link_index
pm_issue_type = params[:pm_issue_type] || [1, 2, 3]
not_join_id = case params[:issue_filter_type]
when 'leaf_issue'
Issue.where(root_id: @issue.id).pluck(:id)
when 'link_issue'
@issue.pm_links.pluck(:be_linkable_id)
end
not_join_id << @issue.id
object_issues = Issue.where(
pm_project_id: params[:pm_project_id],
pm_issue_type: pm_issue_type
).where.not(id: not_join_id).order(updated_on: :desc)
object_issues = object_issues.where(root_id: nil, child_count: 0) if params[:issue_filter_type] == 'leaf_issue'
@issues = kaminari_paginate(object_issues)
render 'api/v1/issues/index'
end
def parent_issues
@issues = Issue.where(pm_project_id: params[:pm_project_id])
.where.not(id: @issue.id)
.where.not(id: Issue.full_children_issues(@issue).map{|i|i.id})
@issues = @issues.where(pm_issue_type: params[:pm_issue_type]) if params[:pm_issue_type].present?
@issues = @issues.ransack(id_or_project_issues_index_eq: params[:keyword]).result.or(@issues.ransack(subject_or_description_cont: params[:keyword]).result) if params[:keyword].present?
@issues = @issues.reorder("#{issue_sort_by} #{issue_sort_direction}")
if params[:only_name].present?
@issues = kaminary_select_paginate(
@issues.select(:id, :subject, :project_issues_index, :updated_on, :created_on))
else
@issues = @issues.includes(:priority, :issue_status, :user, :show_assigners, :show_issue_tags, :version, :comment_journals)
@issues = kaminari_paginate(@issues)
end
end
def show
@issue.associate_attachment_container
render 'api/v1/issues/show'
end
def create
@object_result = Api::Pm::Issues::CreateService.call(@project, issue_params, current_user)
render 'api/v1/issues/create'
end
def update
@object_result = Api::Pm::Issues::UpdateService.call(@project, @issue, issue_params, current_user)
render 'api/v1/issues/update'
end
def batch_update
@object_result = Api::Pm::Issues::BatchUpdateService.call(@project, @issues, batch_issue_params, current_user)
if @object_result
render_ok
else
render_error('批量更新疑修失败!')
end
end
def batch_destroy
return render_ok if params[:ids].is_a?(Array) && params[:ids].blank?
@object_result = Api::Pm::Issues::BatchDeleteService.call(@project, @issues, current_user)
if @object_result
render_ok
else
render_error('批量删除疑修失败!')
end
end
def priorities
@priorities = IssuePriority.order(position: :asc)
@priorities = @priorities.ransack(name_cont: params[:keyword]).result if params[:keyword]
@priorities = kaminary_select_paginate(@priorities)
render "api/v1/issues/issue_priorities/index"
end
def tags
# IssueTag.pm_init_data(params[:pm_project_id]) unless $redis_cache.hget("pm_project_init_issue_tags", params[:pm_project_id])
@issue_tags = IssueTag.where(pm_project_id: params[:pm_project_id]).reorder("#{tag_sort_by} #{tag_sort_direction}")
@issue_tags = @issue_tags.ransack(name_cont: params[:keyword]).result if params[:keyword].present?
params[:only_name] = true #强制渲染 不走project
@issue_tags = kaminary_select_paginate(@issue_tags.select(:id, :name, :color))
render "api/v1/issues/issue_tags/index"
end
def statues
@statues = IssueStatus.order("position asc")
@statues = @statues.ransack(name_cont: params[:keyword]).result if params[:keyword].present?
@statues = kaminary_select_paginate(@statues)
render "api/v1/issues/statues/index"
end
def destroy
@object_result = Api::Pm::Issues::DeleteService.call(@project, @issue, current_user)
if @object_result
render_ok
else
render_error('删除疑修失败!')
end
end
def export
return render_error('请输入正确的项目ID.') if params[:pm_project_id].blank?
Axlsx::Package.new do |p|
[['requirement', 1], ['task', 2], ['bug', 3]].each do |type|
p.workbook.add_worksheet(:name => type[0]) do |sheet|
@issues = Issue.where(pm_project_id: params[:pm_project_id], pm_issue_type: type[1])
sheet.add_row ["ID", "标题*", "正文", "创建者*", "创建时间", "修改者", "更新时间", "状态", "负责人", "优先级", "标记", "开始时间","结束时间", "预估工时"]
@issues.each do |issue|
sheet.add_row [issue.id, issue.subject, issue.description, issue.user.try(:login), issue.created_on.strftime("%Y-%m-%d %H:%M:%S"), issue.changer.try(:login), issue.updated_on.strftime("%Y-%m-%d %H:%M:%S"), issue.status_id, issue.assigners.pluck(:login).join(","), issue.priority_id, issue.issue_tags.pluck(:name, :color).join(","), issue.start_date.present? ? issue.start_date.strftime("%Y-%m-%d") : "", issue.due_date.present? ? issue.due_date.strftime("%Y-%m-%d") : "", issue.time_scale]
end
end
end
p.workbook.add_worksheet(:name => 'leaf_relations') do |sheet|
leaf_issues = Issue.where(pm_project_id: params[:pm_project_id]).where.not(root_id: nil)
sheet.add_row ["ID", "父工作项ID"]
leaf_issues.each do |issue|
sheet.add_row [issue.id, issue.root_id]
end
end
p.workbook.add_worksheet(:name => 'link_relations') do |sheet|
# links = PmLink.joins(:linkable_issue).where(issues: {pm_project_id: params[:pm_project_id]})
links = PmLink.find_by_sql("SELECT `pm_links`.* FROM `pm_links` INNER JOIN `issues` ON `issues`.`id` = `pm_links`.`linkable_id` AND `pm_links`.`linkable_type` = 'Issue' WHERE `issues`.`pm_project_id` = #{params[:pm_project_id]}")
sheet.add_row ["ID", "被关联工作项ID"]
links.each do |link|
sheet.add_row [link.linkable_id, link.be_linkable_id]
end
end
p.serialize('public/导出工作项.xlsx')
end
send_file('public/导出工作项.xlsx', :type => 'application/octet-stream;charset=utf-8')
end
def import
begin
return render_error('请上传正确的文件') if params[:file].blank? || !params[:file].is_a?(ActionDispatch::Http::UploadedFile)
return render_error('请输入正确的项目ID.') if params[:pm_project_id].blank?
return render_error('请输入正确的组织ID.') if params[:organization_id].blank?
ActiveRecord::Base.transaction do
types = {requirement: 1, task: 2, bug: 3}
doc = SimpleXlsxReader.open(params[:file].tempfile)
doc.sheets.each do |sheet|
case sheet.name
when 'requirement', 'task', 'bug'
type = types["#{sheet.name}".to_sym]
sheet.rows.each.with_index do |row, index|
next if index == 0
issue = Issue.new(issue_classify: "issue", project_id: 0, pm_project_id: params[:pm_project_id], pm_issue_type: type, tracker_id: Tracker.first.id)
issue.fake_id = row[0]
issue.subject = row[1]
issue.description = row[2]
author = User.find_by(login: row[3])
issue.user = author
issue.created_on = row[4]
changer = User.find_by(login: row[5])
issue.changer = changer
issue.updated_on = row[6]
issue.status_id = row[7].to_i
if row[8].present?
row[8].split(',').each do |a|
u = User.find_by(login: a)
next unless u.present?
issue.assigners << u
end
end
issue.priority_id = row[9]
if row[10].present?
row[10].split(',').each_slice(2).to_a.each do |t|
tag = IssueTag.find_by(project_id: 0, organization_id: params[:organization_id], name: t[0])
if tag.present?
issue.issue_tags << tag
else
tag = IssueTag.create(project_id: 0,organization_id: params[:organization_id], name: t[0], color: t[1])
issue.issue_tags << tag
end
end
end
issue.start_date = row[11]
issue.due_date = row[12]
issue.time_scale = row[13]
issue.save!
end
when 'leaf_relations'
sheet.rows.each.with_index do |row, index|
next if index == 0
children_issue = Issue.where(fake_id: row[0]).last
parent_issue = Issue.where(fake_id: row[1]).last
next if children_issue.blank? || parent_issue.blank?
children_issue.root_id = parent_issue.id
children_issue.save(touch: false)
end
when 'link_relations'
sheet.rows.each.with_index do |row, index|
next if index == 0
link_issue = Issue.where(fake_id: row[0]).last
be_link_issue = Issue.where(fake_id: row[1]).last
next if link_issue.blank? || be_link_issue.blank?
PmLink.create!(linkable_type: 'Issue', linkable_id: link_issue.id, be_linkable_type: 'Issue', be_linkable_id: be_link_issue.id)
end
else
return render_error('导入失败请上传正确格式的excel文件')
end
end
end
render_ok
rescue
return render_error('导入失败请上传正确格式的excel文件')
end
end
def link_issues
children_issues = @issue.pm_issue_type == 1 ? @issue.child_count > 0 ? Issue.where(id: @issue.id) : Issue.none : Issue.where(root_id: @issue.id)
linkable_issues = Issue.where(id: PmLink.where(linkable_type: "Issue", linkable_id: @issue.id).pluck(:be_linkable_id))
belinkable_issues = Issue.where(id: PmLink.where(be_linkable_type: "Issue", be_linkable_id: @issue.id).pluck(:linkable_id))
full_link_issues_ids = children_issues.pluck(:id) | linkable_issues.pluck(:id) | belinkable_issues.pluck(:id)
compare_link_issues_ids = children_issues.pluck(:id) | linkable_issues.pluck(:id) | belinkable_issues.pluck(:id)
i = compare_link_issues_ids.count
while i > 0 do
children_issues = Issue.where(root_id: compare_link_issues_ids)
linkable_issues = Issue.where(id: PmLink.where(linkable_type: "Issue", linkable_id: compare_link_issues_ids).pluck(:be_linkable_id))
belinkable_issues = Issue.where(id: PmLink.where(be_linkable_type: "Issue", be_linkable_id: compare_link_issues_ids).pluck(:linkable_id))
compare_link_issues_ids = (children_issues.pluck(:id) | linkable_issues.pluck(:id) | belinkable_issues.pluck(:id)) - full_link_issues_ids
full_link_issues_ids = full_link_issues_ids | compare_link_issues_ids
i = compare_link_issues_ids.count
end
exclude_issues_ids = []
exclude_issues = Issue.where(id: full_link_issues_ids).where.not(root_id: nil)
exclude_issues.each do |i|
exclude_issues_ids << i.id if i.pm_issue_type == 1 && full_link_issues_ids.include?(i.root_id)
end
full_link_issues_ids = full_link_issues_ids - exclude_issues_ids
@requirement_issues = Issue.where(id:full_link_issues_ids, pm_issue_type:1, root_id: nil).pm_includes
@task_issues = Issue.where(id:full_link_issues_ids, pm_issue_type:2).pm_includes
@bug_issues = Issue.where(id:full_link_issues_ids, pm_issue_type:3).pm_includes
end
private
def circle_link_issues(issue_ids)
if issue_ids.present?
children_issues = Issue.joins(:parent_issue).where(issues: {id: issue_ids})
linkable_issues = Issue.where(id: PmLink.where(linkable_type: "Issue", linkable_id: issue_ids))
belinkable_issues = Issue.where(id: PmLink.where(be_linkable_type: "Issue", be_linkable_id: issue_ids))
return circle_link_issues(children_issues.pluck(:id))
else
return []
end
end
def check_issue_operate_permission
return if params[:project_id].to_i.zero?
render_forbidden('您没有操作权限!') unless @project.member?(current_user) || current_user.admin? || @issue.user == current_user
end
def load_issue
# return render_parameter_missing if params[:pm_project_id].blank?
@issue = Issue.issue_issue.find_by_id(params[:id])
render_not_found('疑修不存在!') if @issue.blank?
end
# def load_issue_by_index
# return render_parameter_missing if params[:pm_project_id].blank? || params[:pm_issue_type].blank? || params[:enterprise_identifier].blank?
# @issue = Issue.find_issues_by_pm(params[:enterprise_identifier], params[:pm_issue_type])
# .find_by(pm_issue_type_index3: params[:index])
# render_not_found('疑修不存在!') if @issue.blank?
# end
def load_issues
return render_error('请输入正确的ID数组') unless params[:ids].is_a?(Array)
params[:ids].each do |id|
@issue = Issue.find_by(id: id, pm_project_id: params[:pm_project_id])
return render_not_found("ID为#{id}的疑修不存在!") if @issue.blank?
end
if params[:ids].blank?
@issues = Issue.where(pm_project_id: params[:pm_project_id])
else
@issues = Issue.where(id: params[:ids], pm_project_id: params[:pm_project_id])
end
end
def query_params
params.permit(
:only_name,
:category,
:participant_category,
:keyword, :author_id,
:milestone_id, :assigner_id,
:status_id, :priority_id,
:begin_date, :end_date,
:update_begin_date, :update_end_date,
:sort_by, :sort_direction, :root_id,
:issue_tag_ids, :pm_project_id, :pm_sprint_id, :pm_issue_type, :pm_project_ids,
:status_ids, :ids, :exclude_ids, :pm_issue_types, :participator_id, :enterprise_identifier
)
end
def issue_params
params.permit(
:status_id, :priority_id, :milestone_id,
:branch_name, :start_date, :due_date, :time_scale,
:subject, :description, :blockchain_token_num, :root_subject,
:pm_project_id, :pm_sprint_id, :pm_issue_type, :root_id, :link_able_id, :project_id,
:status_msg, :enterprise_identifier,
issue_tag_ids: [],
assigner_ids: [],
attachment_ids: [],
receivers_login: []
)
end
def batch_issue_params
params.permit(
:status_id, :priority_id, :milestone_id, :pm_sprint_id, :due_date, :pm_issue_type, :root_id, :target_pm_project_id, :project_id,
:issue_tag_ids => [],
:assigner_ids => [] )
end
def issue_sort_by
sort_by = params.fetch(:sort_by, "updated_on")
sort_by = Issue.column_names.include?(sort_by) ? sort_by : "updated_on"
sort_by
end
def issue_sort_direction
sort_direction = params.fetch(:sort_direction, "desc").downcase
sort_direction = %w(desc asc).include?(sort_direction) ? sort_direction : "desc"
sort_direction
end
def tag_sort_by
sort_by = params.fetch(:sort_by, "created_at")
sort_by = IssueTag.column_names.include?(sort_by) ? sort_by : "created_at"
sort_by
end
def tag_sort_direction
sort_direction = params.fetch(:sort_direction, "desc").downcase
sort_direction = %w(desc asc).include?(sort_direction) ? sort_direction : "desc"
sort_direction
end
end

View File

@ -0,0 +1,61 @@
class Api::Pm::JournalsController < Api::Pm::BaseController
before_action :require_login, except: [:index, :children_journals]
before_action :load_project
before_action :load_issue
before_action :load_journal, only: [:children_journals, :update, :destroy]
def index
@object_result = Api::V1::Issues::Journals::ListService.call(@issue, query_params, current_user)
@total_journals_count = @object_result[:total_journals_count]
@total_operate_journals_count = @object_result[:total_operate_journals_count]
@total_comment_journals_count = @object_result[:total_comment_journals_count]
@journals = kaminary_select_paginate(@object_result[:data])
render 'api/pm/issues/journals/index'
end
def create
@object_result = Api::V1::Issues::Journals::CreateService.call(@issue, journal_params, current_user)
render 'api/v1/issues/journals/create'
end
def children_journals
@object_results = Api::V1::Issues::Journals::ChildrenListService.call(@issue, @journal, query_params, current_user)
@journals = kaminari_paginate(@object_results)
render 'api/v1/issues/journals/children_journals'
end
def update
@object_result = Api::V1::Issues::Journals::UpdateService.call(@issue, @journal, journal_params, current_user)
render 'api/v1/issues/journals/update'
end
def destroy
TouchWebhookJob.set(wait: 5.seconds).perform_later('IssueComment', @issue&.id, current_user.id, @journal.id, 'deleted', JSON.parse(@journal.to_builder.target!))
if @journal.destroy!
render_ok
else
render_error('删除评论失败!')
end
end
private
def query_params
params.permit(:category, :keyword, :sort_by, :sort_direction)
end
def journal_params
params.permit(:notes, :parent_id, :reply_id, :attachment_ids => [], :receivers_login => [])
end
def load_issue
@issue = Issue.issue_issue.where(pm_project_id: params[:pm_project_id]).find_by_id(params[:issue_id])
render_not_found('疑修不存在!') if @issue.blank?
end
def load_journal
@journal = Journal.find_by_id(params[:id])
render_not_found('评论不存在!') unless @journal.present?
end
end

View File

@ -0,0 +1,77 @@
class Api::Pm::PipelinesController < Api::Pm::BaseController
include RepositoriesHelper
def index
@owner = Owner.find_by(login: params[:owner_id].to_s) || Owner.find_by(id: params[:owner_id].to_s)
tip_exception('组织未找到') if @owner.blank?
unless @owner.is_a?(Organization) && @owner.is_member?(current_user.id)
tip_exception('没有查看组织的权限')
end
@project_ids = @owner.projects.ids
project_gpids = @owner.projects.pluck(:gpid)
action_runs = Gitea::ActionRun.where(owner_id: @owner.gitea_uid)
group_data = action_runs.where(status: [1,2]).group(:workflow_id, :status).count
pipelines = Action::Pipeline.where(project_id: @project_ids).order(updated_at: :desc)
run_files = Gitea::ActionRun.select(:workflow_id, :repo_id).where(owner_id: @owner.gitea_uid).group(:workflow_id, :repo_id)
db_files = pipelines.pluck(:file_name)
@run_result = []
run_files.each do |file_info|
file = file_info.workflow_id
project = Project.find_by(gpid: file_info.repo_id)
next if project.blank?
unless db_files.include?(".gitea/workflows/#{file}")
pipeline = Action::Pipeline.find_or_initialize_by(pipeline_name: file.to_s.gsub(".yml", "").gsub(".yaml", ""),
file_name: ".gitea/workflows/#{file}",
branch: project.default_branch,
is_graphic_design: false,
disable: false,
project_id: project.id)
interactor = Repositories::EntriesInteractor.call(@owner, project.identifier, ".gitea/workflows/#{file}", ref: project.default_branch)
if interactor.success?
pipeline.yaml = decode64_content(interactor.result, @owner, project.repository, project.default_branch, nil)
end
pipeline.user_id = current_user.id
pipeline.save
# 导入的流水线统一先禁用
$gitea_hat_client.post_repos_actions_disable(project&.owner&.login, project&.identifier, {query: {workflow: file}}) rescue nil
end
last_action_run = action_runs.where(repo_id: project.gpid).where(workflow_id: file).order(updated: :desc).first
last_action_run_json = last_action_run.present? ? {
id: last_action_run.id,
schedule: last_action_run.schedule_id > 0,
title: last_action_run.title,
index: last_action_run.index,
status: last_action_run.status,
started: last_action_run.started,
stopped: last_action_run.stopped,
length: last_action_run.stopped-last_action_run.started,
created: last_action_run.created,
updated: last_action_run.updated,
} : {}
total = 0
success = 0
failure = 0
group_data.each do |k,v|
total += v if k[0] == file
success += v if k[0] == file && k[1] == 1
failure += v if k[0] == file && k[1] == 2
end
@run_result << {
repo_id: last_action_run.repo_id,
filename: ".gitea/workflows/#{file}",
total: total,
success: success,
failure: failure
}.merge(last_action_run_json)
end
# Rails.logger.info("@run_result======#{@run_result}")
@disabled_workflows = Gitea::RepoUnit.where(repo_id: project_gpids, type: 10).where("config is not null")
@pipelines = Action::Pipeline.select("distinct project_id,max(updated_at) as updated_at")
.where(project_id: @project_ids).group(:project_id).order("updated_at desc")
@pipelines = @pipelines.where("pipeline_name like ?", "%#{params[:pipeline_name]}%") if params[:pipeline_name].present?
@pipelines = @pipelines.where(pipeline_type: params[:pipeline_type]) if params[:pipeline_type].present?
@pipelines = kaminari_paginate(@pipelines)
end
end

View File

@ -0,0 +1,156 @@
class Api::Pm::ProjectsController < Api::Pm::BaseController
before_action :require_login, except: [:convert]
before_action :load_project, only: [:convert]
def convert
data = {
owner: @project.owner.try(:login),
identifier: @project.identifier,
name: @project.name
}
render_ok(data: data)
end
def issues_count
return tip_exception '参数错误' unless params[:pm_project_id].present?
@issues = Issue.where(pm_project_id: params[:pm_project_id])
case params[:category].to_s
when 'closed'
@issues = @issues.closed
when 'opened'
@issues = @issues.opened
end
@participant_category_count = {}
if params[:participant_category].to_s == "authoredme" or params[:participant_category].to_s == "assignedme"
issues_category = @issues.joins(:issue_participants).where(pm_issue_type: [1, 2, 3]).where(issue_participants: {participant_type: %w[authored assigned atme], participant_id: current_user&.id})
@participant_category_count = issues_category.group(:pm_project_id, "issue_participants.participant_type").count
end
case params[:participant_category].to_s
when 'aboutme' # 关于我的
@issues = @issues.joins(:issue_participants).where(issue_participants: {participant_type: %w[authored assigned atme], participant_id: current_user&.id})
when 'authoredme' # 我创建的
@issues = @issues.joins(:issue_participants).where(issue_participants: {participant_type: 'authored', participant_id: current_user&.id})
when 'assignedme' # 我负责的
@issues = @issues.joins(:issue_participants).where(issue_participants: {participant_type: 'assigned', participant_id: current_user&.id})
when 'atme' # @我的
@issues = @issues.joins(:issue_participants).where(issue_participants: {participant_type: 'atme', participant_id: current_user&.id})
end
data = {}
@issues_count = @issues.group(:pm_project_id).count
# requirement 1 task 2 bug 3
@issues_type_count = @issues.group(:pm_project_id, :pm_issue_type).count
params[:pm_project_id].map(&:to_i).map do |project_id|
data[project_id] = {
total: @issues_count[project_id] || 0,
requirement: @issues_type_count[[project_id, 1]] || 0,
task: @issues_type_count[[project_id, 2]] || 0,
bug: @issues_type_count[[project_id, 3]] || 0,
authoredme: @participant_category_count[[project_id, 0]] || 0,
assignedme: @participant_category_count[[project_id, 1]] || 0,
atme: @participant_category_count[[project_id, 4]] || 0,
}
end
render_ok(data: data)
end
def statistics
return tip_exception '参数错误' if params[:pm_project_id].blank?
@issues = Issue.where(pm_project_id: params[:pm_project_id], pm_issue_type:[1, 2, 3])
@last_week_close_issues = @issues.where(status_id: 5).where("updated_on > ? and updated_on < ?", Time.now - 7.days, Time.now)
last_week_close_type_count_data = @last_week_close_issues.group(:pm_issue_type).count
type_count_data = @issues.group(:pm_issue_type).count
type_status = @issues.group(:pm_issue_type,:status_id).count
type_status_data = {}
IssueStatus.all.map do |e|
# next if e.id == 5
[1,2,3].map{ |type|
next if type == 1 && [1, 6].include?(e.id)
type_status_data[type] = {} if type_status_data[type].nil?
if type_status[[type,e.id]].nil?
type_status_data[type][e.id] = 0
else
type_status_data[type][e.id] = type_status[[type,e.id]]
end
}
end
open_data = {
"1": type_status_data[1][1].to_i + type_status_data[1][2].to_i + type_status_data[1][3].to_i + type_status_data[1][6].to_i,
"2": type_status_data[2][1].to_i + type_status_data[2][2].to_i + type_status_data[2][3].to_i + type_status_data[2][6].to_i,
"3": type_status_data[3][1].to_i + type_status_data[3][2].to_i + type_status_data[3][3].to_i + type_status_data[3][6].to_i,
}
if type_count_data.keys.size < 3
nedd_add = [1,2,3] - type_count_data.keys
nedd_add.map{ |e|
type_count_data[e] = 0
}
end
if last_week_close_type_count_data.keys.size < 3
nedd_add = [1,2,3] - last_week_close_type_count_data.keys
nedd_add.map{ |e|
last_week_close_type_count_data[e] = 0
}
end
data = {
pie_chart: type_count_data,
bar_chart: type_status_data,
open_data: open_data,
last_week_close_data: last_week_close_type_count_data,
}
render_ok(data: data)
end
def polyline
return tip_exception '参数错误' if params[:pm_project_id].blank?
time_line = (Time.current.beginning_of_day - 29.day) .. Time.current
@create_issues = Issue.where(pm_project_id: params[:pm_project_id],created_on: time_line)
@due_issues = Issue.where(pm_project_id: params[:pm_project_id],status_id:[3,5],due_date: time_line)
@create_issues_count = @create_issues.group(:pm_issue_type,"DATE(created_on)").count
@due_issues_count = @due_issues.group(:pm_issue_type,"DATE(due_date)").count
data = {
create_issues: {},
due_issues: {}
}
30.times do |time|
current_time = Date.current - time.day
if @create_issues_count.present?
data[:create_issues][current_time] = {
"1": @create_issues_count[[1,current_time]] || 0,
"2": @create_issues_count[[2,current_time]] || 0,
"3": @create_issues_count[[3,current_time]] || 0
}
else
data[:create_issues][current_time] = {
"1": 0,
"2": 0,
"3": 0
}
end
if @due_issues_count.present?
data[:due_issues][current_time] = {
"1": @due_issues_count[[1,current_time]] || 0,
"2": @due_issues_count[[2,current_time]] || 0,
"3": @due_issues_count[[3,current_time]] || 0
}
else
data[:due_issues][current_time] = {
"1": 0,
"2": 0,
"3": 0
}
end
end
render_ok(data: data)
end
def bind_project
return render_forbidden('您没有操作权限!') unless @project.member?(current_user) || current_user.admin?
Issue.where(pm_project_id: params[:pm_project_id], user_id: current_user).update_all(project_id: params[:project_id])
end
private
def load_project
@project = Project.joins(:owner).find params[:project_id]
end
end

View File

@ -0,0 +1,109 @@
class Api::Pm::SprintIssuesController < Api::Pm::BaseController
before_action :require_login, except: [:index]
def index
@issues = Api::Pm::SprintIssues::ListService.call(query_params, current_user)
@issues = kaminari_paginate(@issues)
render 'api/v1/issues/index'
end
def burndown_charts
return tip_exception '参数错误' if params[:pm_sprint_id].blank? || params[:start_time].blank? || params[:end_time].blank?
@issues = Issue.where(pm_sprint_id: params[:pm_sprint_id])
start_time = Date.parse params[:start_time]
end_time = Date.parse params[:end_time]
time_count = (end_time - start_time).to_i + 1 # 计算间隔时间 加上最后一天
data = []
curren_issues = @issues.group(:status_id, :due_date).count
total_count = @issues.count
cardinality = (total_count.zero? || time_count.zero?) ? 0 : total_count.to_f / time_count.to_f
# cardinality = BigDecimal.new(total_count) / BigDecimal.new(time_count)
time_count.times do |x|
e_time = start_time + x
completed = curren_issues[[5, e_time]].to_i + curren_issues[[3, e_time]].to_i - @issues.where(pm_issue_type: 3, status_id: 3).size
total_count = total_count - completed
data << { time: e_time, undone: total_count, completed: completed, base_number: (cardinality * (time_count - x - 1)).to_f.round(2) }
end
render_ok(data: data)
end
def statistics
pm_sprint_ids = params[:pm_sprint_ids].split(",") rescue []
return tip_exception '参数错误' if pm_sprint_ids.blank?
@issues = Issue.where(pm_sprint_id: pm_sprint_ids)
data = {}
# requirement 1 task 2 bug 3
@issues_count = @issues.group(:pm_sprint_id).count
@issues_type_count = @issues.group(:pm_sprint_id, :status_id).count
@issues_pm_type_count = @issues.group(:pm_sprint_id, :pm_issue_type).count
@issues_hour_count = @issues.group(:pm_sprint_id).sum(:time_scale)
@issues_hour_type_count = @issues.group(:pm_sprint_id, :status_id).sum(:time_scale)
@issues_hour_pm_type_count = @issues.group(:pm_sprint_id, :pm_issue_type).sum(:time_scale)
@issues_status_pm_type_count = @issues.group(:pm_sprint_id, :pm_issue_type, :status_id).count
pm_sprint_ids.map(&:to_i).map do |sprint_id|
# count_closed 工作项已完成/已关闭数量,需排除已修复的缺陷数量
count_closed = @issues_type_count[[sprint_id, 5]].to_i + @issues_type_count[[sprint_id, 3]].to_i - @issues.where(pm_sprint_id: sprint_id, pm_issue_type: 3, status_id: 3).size
# hour_closed 已完成/已关闭 预估工时之和,需排除已修复的缺陷预估工时
hour_closed = @issues_hour_type_count[[sprint_id, 5]].to_f + @issues_hour_type_count[[sprint_id, 3]].to_f - @issues.where(pm_sprint_id: sprint_id, pm_issue_type: 3, status_id: 3).sum(:time_scale).to_f
data[sprint_id] = {
count_total: @issues_count[sprint_id] || 0,
count_closed: count_closed || 0,
hour_total: @issues_hour_count[sprint_id].to_f || 0,
hour_closed: hour_closed || 0,
requirement: @issues_pm_type_count[[sprint_id, 1]] || 0,
task: @issues_pm_type_count[[sprint_id, 2]] || 0,
bug: @issues_pm_type_count[[sprint_id, 3]] || 0,
requirement_hour: @issues_hour_pm_type_count[[sprint_id, 1]].to_i || 0,
task_hour: @issues_hour_pm_type_count[[sprint_id, 2]].to_i || 0,
bug_hour: @issues_hour_pm_type_count[[sprint_id, 3]].to_i || 0,
requirement_open: (@issues_status_pm_type_count[[sprint_id, 1, 1]].to_i + @issues_status_pm_type_count[[sprint_id, 1, 2]].to_i) || 0,
task_open: @issues_status_pm_type_count[[sprint_id, 2, 1]].to_i + @issues_status_pm_type_count[[sprint_id, 2, 2]].to_i || 0,
bug_open: @issues_status_pm_type_count[[sprint_id, 3, 1]].to_i + @issues_status_pm_type_count[[sprint_id, 3, 2]].to_i || 0
}
end
render_ok(data: data)
end
before_action :load_uncomplete_issues, only: [:complete]
def complete
begin
case complete_params[:complete_type].to_i
when 1
@issues.update_all(status_id: 5, due_date: Time.now)
when 2
@issues.update_all(pm_sprint_id: 0)
when 3
@issues.update_all(pm_sprint_id: complete_params[:target_pm_project_sprint_id])
end
render_ok
rescue => e
render_error(e.message)
end
end
private
def load_uncomplete_issues
@issues = Issue.where(pm_sprint_id: complete_params[:pm_project_sprint_id]).where.not(status_id: 5)
end
def complete_params
params.permit(:pm_project_sprint_id, :complete_type, :target_pm_project_sprint_id)
end
def query_params
params.permit(
:category,
:pm_project_id,
:pm_issue_type, # 需求1 任务2 缺陷3
:assigner_id,
:priority_id,
:status_id,
:keyword, :status_ids, :pm_issue_types,
:sort_by, :sort_direction
)
end
end

View File

@ -0,0 +1,82 @@
class Api::Pm::WeeklyIssuesController < Api::Pm::BaseController
def personal
@enterprise_identifier = params[:enterprise_identifier] || ''
return render_error('请输入正确的用户ID.') if params[:user_id].blank?
@all_issues = Issue.joins(:issue_participants).where(issue_participants: {participant_id: params[:user_id], participant_type: ['assigned']})
@all_issues = @all_issues.where(enterprise_identifier: @enterprise_identifier, pm_issue_type: [1,2,3])
@this_week_all_issues = @all_issues.where("due_date >= ? and start_date <= ?", Date.today.beginning_of_week.to_s, Date.today.end_of_week.to_s).distinct
@this_week_all_issues = @this_week_all_issues.order('created_on desc')
@next_week_all_issues = @all_issues.where("due_date >= ? and start_date <=?", (Date.today.beginning_of_week+1.week).to_s, (Date.today.end_of_week+1.week).to_s).distinct
@next_week_all_issues = @next_week_all_issues.order('created_on desc')
@this_week_requirement_issues = @this_week_all_issues.where(pm_issue_type: 1)
@this_week_task_issues = @this_week_all_issues.where(pm_issue_type: 2)
@this_week_bug_issues = @this_week_all_issues.where(pm_issue_type: 3)
@close_requirement_issues = @this_week_requirement_issues.where(status_id: [3,5])
@close_task_issues = @this_week_task_issues.where(status_id: [3,5])
@close_bug_issues = @this_week_bug_issues.where(status_id: [3,5])
this_week_page = params[:this_week_page] || 1
this_week_limit = params[:this_week_limit] || 15
@this_week_all_issues = @this_week_all_issues.page(this_week_page).per(this_week_limit)
next_week_page = params[:next_week_page] || 1
next_week_limit = params[:next_week_limit] || 15
@next_week_all_issues = @next_week_all_issues.page(next_week_page).per(next_week_limit)
end
def group
@enterprise_identifier = params[:enterprise_identifier] || ''
@all_issues = Issue.where(enterprise_identifier: @enterprise_identifier, pm_issue_type: [1,2,3])
@all_issues = @all_issues.where(pm_project_id: params[:pm_project_ids].split(",")) if params[:pm_project_ids].present?
@this_week_all_issues = @all_issues.where("due_date >= ? and start_date <= ?", Date.today.beginning_of_week.to_s, Date.today.end_of_week.to_s)
@this_week_all_issues_group_count = @this_week_all_issues.group(:pm_project_id).count
data = {}
@this_week_all_issues_group_count.keys.each do |pm_project_id|
this_project_id_requirements = @this_week_all_issues.where(pm_project_id: pm_project_id, pm_issue_type: 1)
this_project_id_tasks = @this_week_all_issues.where(pm_project_id: pm_project_id, pm_issue_type: 2)
this_project_id_bugs = @this_week_all_issues.where(pm_project_id: pm_project_id, pm_issue_type: 3)
this_project_id_close_requirements = this_project_id_requirements.where(status_id: [3,5])
this_project_id_close_tasks = this_project_id_tasks.where(status_id: [3,5])
this_project_id_close_bugs = this_project_id_bugs.where(status_id: [3,5])
data[pm_project_id] = {
this_week_requirement_issues_count: this_project_id_requirements.count,
this_week_task_issues_count: this_project_id_tasks.count,
this_week_bug_issues_count: this_project_id_bugs.count,
close_requirement_issues_count: this_project_id_close_requirements.count,
close_task_issues_count: this_project_id_close_tasks.count,
close_bug_issues_count: this_project_id_close_bugs.count,
this_week_task_issues: this_project_id_tasks
}
end
render :json => data
end
def group_issues
@enterprise_identifier = params[:enterprise_identifier] || ''
@all_issues = Issue.where(enterprise_identifier: @enterprise_identifier, pm_issue_type: [1,2,3])
@all_issues = @all_issues.where(pm_project_id: params[:pm_project_ids].split(",")) if params[:pm_project_ids].present?
@all_issues = @all_issues.where(pm_issue_type: params[:pm_issue_type].to_i) if params[:pm_issue_type].present?
@this_week_all_issues = @all_issues.where("due_date >= ? and start_date <= ?", Date.today.beginning_of_week.to_s, Date.today.end_of_week.to_s)
@this_week_all_issues = @this_week_all_issues.order('created_on desc')
@this_week_all_issues = kaminari_paginate(@this_week_all_issues)
end
def personal_issues
@enterprise_identifier = params[:enterprise_identifier] || ''
return render_error('请输入正确的用户ID.') if params[:user_id].blank?
@all_issues = Issue.joins(:issue_participants).where(issue_participants: {participant_id: params[:user_id], participant_type: ['assigned']})
@all_issues = @all_issues.where(enterprise_identifier: @enterprise_identifier, pm_issue_type: [1,2,3])
@this_week_all_issues = @all_issues.where("due_date >= ? and start_date <= ?", Date.today.beginning_of_week.to_s, Date.today.end_of_week.to_s).distinct
@this_week_all_issues = @this_week_all_issues.order('created_on desc')
@next_week_all_issues = @all_issues.where("due_date >= ? and start_date <=?", (Date.today.beginning_of_week+1.week).to_s, (Date.today.end_of_week+1.week).to_s).distinct
@next_week_all_issues = @next_week_all_issues.order('created_on desc')
this_week_page = params[:this_week_page] || 1
this_week_limit = params[:this_week_limit] || 15
@this_week_all_issues = @this_week_all_issues.page(this_week_page).per(this_week_limit)
next_week_page = params[:next_week_page] || 1
next_week_limit = params[:next_week_limit] || 15
@next_week_all_issues = @next_week_all_issues.page(next_week_page).per(next_week_limit)
end
end

View File

@ -55,9 +55,14 @@ class Api::V1::BaseController < ApplicationController
return render_forbidden if !current_user.admin? && !@project.operator?(current_user) && !(@project.fork_project.present? && @project.fork_project.operator?(current_user)) return render_forbidden if !current_user.admin? && !@project.operator?(current_user) && !(@project.fork_project.present? && @project.fork_project.operator?(current_user))
end end
def require_member_above
@project = load_project
return render_forbidden if !current_user.admin? && !@project.member?(current_user)
end
# 具有对仓库的访问权限 # 具有对仓库的访问权限
def require_public_and_member_above def require_public_and_member_above
@project = load_project @project = load_project
return render_forbidden if !@project.is_public && !current_user.admin? && !@project.member?(current_user) return render_forbidden if !@project.is_public && !current_user.admin? && !@project.member?(current_user)
end end
end end

View File

@ -0,0 +1,37 @@
class Api::V1::GitlinkCompetitionAppliesController < Api::V1::BaseController
def create
return render_error("请输入正确的竞赛ID") unless params[:competition_id].present?
return render_error("请输入正确的队伍ID") unless params[:team_id].present?
return render_error("请输入正确的队伍成员信息") unless params[:team_members].is_a?(Array)
params[:team_members].each do |member|
apply = GitlinkCompetitionApply.find_or_create_by(competition_id: params[:competition_id], team_id: params[:team_id], educoder_login: member[:login])
apply.competition_identifier = params[:competition_identifier]
apply.team_name = params[:team_name]
apply.school_name = member[:school_name]
apply.nickname = member[:nickname]
apply.identity = member[:identity]
apply.role = member[:role]
apply.email = member[:email]
user_info = get_user_info_by_educoder_login(member[:login])
apply.phone = user_info["phone"]
apply.save
end
render_ok
end
def get_user_info_by_educoder_login(edu_login)
req_params = { "login" => "#{edu_login}", "private_token" => "hriEn3UwXfJs3PmyXnqQ" }
api_url= "https://data.educoder.net"
client = Faraday.new(url: api_url)
response = client.public_send("get", "/api/sources/get_user_info_by_login", req_params)
result = JSON.parse(response.body)
return nil if result["status"].to_s != "0"
# login 邮箱 手机号 姓名 学校/单位
user_info = result["data"]
return user_info
end
end

View File

@ -1,5 +1,5 @@
class Api::V1::Issues::IssueTagsController < Api::V1::BaseController class Api::V1::Issues::IssueTagsController < Api::V1::BaseController
before_action :require_login, except: [:index] before_action :require_login, except: [:index, :pm_index]
before_action :require_public_and_member_above, only: [:index] before_action :require_public_and_member_above, only: [:index]
before_action :require_operate_above, only: [:create, :update, :destroy] before_action :require_operate_above, only: [:create, :update, :destroy]
@ -7,13 +7,13 @@ class Api::V1::Issues::IssueTagsController < Api::V1::BaseController
@issue_tags = @project.issue_tags.reorder("#{sort_by} #{sort_direction}") @issue_tags = @project.issue_tags.reorder("#{sort_by} #{sort_direction}")
@issue_tags = @issue_tags.ransack(name_cont: params[:keyword]).result if params[:keyword].present? @issue_tags = @issue_tags.ransack(name_cont: params[:keyword]).result if params[:keyword].present?
if params[:only_name] if params[:only_name]
@issue_tags = kaminary_select_paginate(@issue_tags.select(:id, :name, :color)) @issue_tags = kaminary_select_paginate(@issue_tags.select(:id, :name, :color))
else else
@issue_tags = kaminari_paginate(@issue_tags.includes(:project, :user, :issue_issues, :pull_request_issues)) @issue_tags = kaminari_paginate(@issue_tags.includes(:project, :user, :issue_issues, :pull_request_issues))
end end
end end
def create def create
@issue_tag = @project.issue_tags.new(issue_tag_params) @issue_tag = @project.issue_tags.new(issue_tag_params)
if @issue_tag.save! if @issue_tag.save!
render_ok render_ok

View File

@ -46,7 +46,7 @@ class Api::V1::Issues::JournalsController < Api::V1::BaseController
end end
def load_issue def load_issue
@issue = @project.issues.issue_issue.where(project_issues_index: params[:index]).where.not(id: params[:index]).take || Issue.find_by_id(params[:index]) @issue = @project.issues.issue_issue.where(project_issues_index: params[:index]).where.not(id: params[:index]).take || @project.issues.issue_issue.find_by_id(params[:index])
if @issue.blank? if @issue.blank?
render_not_found("疑修不存在!") render_not_found("疑修不存在!")
end end

View File

@ -1,6 +1,6 @@
class Api::V1::IssuesController < Api::V1::BaseController class Api::V1::IssuesController < Api::V1::BaseController
before_action :require_login, except: [:index, :show] before_action :require_login, except: [:index, :show, :show_by_id]
before_action :require_public_and_member_above, only: [:index, :show, :create, :update, :destroy] before_action :require_public_and_member_above, only: [:index, :show, :show_by_id, :create, :update, :destroy]
before_action :require_operate_above, only: [:batch_update, :batch_destroy] before_action :require_operate_above, only: [:batch_update, :batch_destroy]
def index def index
@ -22,8 +22,15 @@ class Api::V1::IssuesController < Api::V1::BaseController
before_action :load_issue, only: [:show, :update, :destroy] before_action :load_issue, only: [:show, :update, :destroy]
before_action :check_issue_operate_permission, only: [:update, :destroy] before_action :check_issue_operate_permission, only: [:update, :destroy]
before_action :load_issue_by_id, only: [:show_by_id]
def show def show_by_id
@issue.associate_attachment_container
@user_permission = current_user.present? && current_user.logged? && (@project.member?(current_user) || current_user.admin? || @issue.user == current_user)
end
def show
@issue.associate_attachment_container
@user_permission = current_user.present? && current_user.logged? && (@project.member?(current_user) || current_user.admin? || @issue.user == current_user) @user_permission = current_user.present? && current_user.logged? && (@project.member?(current_user) || current_user.admin? || @issue.user == current_user)
end end
@ -63,7 +70,14 @@ class Api::V1::IssuesController < Api::V1::BaseController
private private
def load_issue def load_issue
@issue = @project.issues.issue_issue.where(project_issues_index: params[:index]).where.not(id: params[:index]).take || Issue.find_by_id(params[:index]) @issue = @project.issues.issue_issue.where(project_issues_index: params[:index]).where.not(id: params[:index]).take || @project.issues.issue_issue.find_by_id(params[:index])
if @issue.blank?
render_not_found("疑修不存在!")
end
end
def load_issue_by_id
@issue = Issue.find_by_id(params[:index])
if @issue.blank? if @issue.blank?
render_not_found("疑修不存在!") render_not_found("疑修不存在!")
end end

View File

@ -0,0 +1,36 @@
class Api::V1::PmIssuesController < ApplicationController
before_action :require_login, except: [:index, :show]
def index
project = Project.find_by_id(params[:project_id]) || Project.new( id: 0, user_id: 0, name:"pm_mm", identifier:"pm_mm" )
object_result = Api::V1::Issues::ListService.call(@project, query_params, current_user)
@total_issues_count = @object_result[:total_issues_count]
@opened_issues_count = @object_result[:opened_issues_count]
@closed_issues_count = @object_result[:closed_issues_count]
if params[:only_name].present?
@issues = kaminary_select_paginate(@object_result[:data].select(:id, :subject, :project_issues_index, :updated_on, :created_on))
else
@issues = kaminari_paginate(@object_result[:data])
end
end
def create
project = Project.find_by_id(params[:project_id]) || Project.new( id: 0, user_id: 0, name:"pm_mm", identifier:"pm_mm" )
@object_result = Api::V1::Issues::CreateService.call(project, issue_params, current_user)
end
private
def issue_params
params.permit(
:status_id, :priority_id, :milestone_id,
:branch_name, :start_date, :due_date,
:subject, :description, :blockchain_token_num,
:pm_project_id, :pm_sprint_id,
:issue_tag_ids => [],
:assigner_ids => [],
:attachment_ids => [],
:receivers_login => []
)
end
end

View File

@ -0,0 +1,10 @@
class Api::V1::ProjectDatasetsController < Api::V1::BaseController
def index
return render_error("请输入正确的项目id字符串") unless params[:ids].present?
ids = params[:ids].split(",")
@project_datasets = ProjectDataset.where(project_id: ids).includes(:license, :project)
@project_datasets = kaminari_unlimit_paginate(@project_datasets)
end
end

View File

@ -0,0 +1,93 @@
class Api::V1::Projects::Actions::ActionsController < Api::V1::Projects::Actions::BaseController
def new_index
@files = $gitea_client.get_repos_contents_by_owner_repo_filepath(@project&.owner&.login, @project&.identifier, ".gitea/workflows") rescue []
@workflows = params[:workflows].split(",") if params[:workflows].present?
@action_runs = Gitea::ActionRun.where(repo_id: @project.gpid)
disabled_config = Gitea::RepoUnit.where(repo_id: @project.gpid, type: 10)&.first&.config
disabled_workflows = disabled_config.present? ? JSON.parse(disabled_config)["DisabledWorkflows"] : []
@action_runs = @action_runs.where(id: params[:ids].split(",")) if params[:ids].present?
@action_runs = @action_runs.where(workflow_id: @workflows) if params[:workflows].present?
group_data = @action_runs.where(status: [1,2]).group(:workflow_id, :status).count
@result = []
@files.map{|i|i['name']}.each do |file|
if @workflows.present?
next if !@workflows.include?(file)
end
last_action_run = @action_runs.where(workflow_id: file).order(updated: :desc).first
last_action_run_json = last_action_run.present? ? {
pipeline_id: Action::Pipeline.find_by(pipeline_name: file, project_id: @project.id),
id: last_action_run.id,
schedule: last_action_run.schedule_id > 0,
title: last_action_run.title,
index: last_action_run.index,
status: last_action_run.status,
started: last_action_run.started,
stopped: last_action_run.stopped,
length: last_action_run.stopped-last_action_run.started,
created: last_action_run.created,
updated: last_action_run.updated,
} : {}
total = 0
success = 0
failure = 0
group_data.each do |k,v|
total += v if k[0] == file
success += v if k[0] == file && k[1] == 1
failure += v if k[0] == file && k[1] == 2
end
pipeline_type = 1
begin
content = Gitea::Repository::Entries::GetService.call(@project&.owner, @project&.identifier, URI.escape(file), ref: last_action_run.present? ? last_action_run.ref.gsub("refs/heads/","") : @project.default_branch)['content']
yaml_string = Base64.decode64(content).force_encoding("GBK").encode("UTF-8") unless Base64.decode64(content).force_encoding('UTF-8').valid_encoding?
yaml_string = Base64.decode64(content).force_encoding('UTF-8')
yml = YAML.safe_load(yaml_string)
pipeline_type = yml.name == file.to_s.gsub(".yml","").gsub(".yaml","") ? 2 : 1
rescue
Rails.logger.info("#{file}不能识别流水线类型")
end
@result << {
filename: file,
disabled: disabled_workflows.include?(file.to_s),
name: file.to_s.gsub(".yml","").gsub(".yaml","") ,
branch: last_action_run.present? ? last_action_run.ref.gsub("refs/heads/","") : @project.default_branch,
pipeline_type: pipeline_type,
total: total,
success: success,
failure: failure
}.merge(last_action_run_json)
end
render :json => {data: @result}
end
def index
begin
gitea_result = $gitea_hat_client.get_repos_actions_by_owner_repo(@project&.owner&.login, @project&.identifier)
@data = gitea_result[:data]["Workflows"]
rescue
@data = []
end
end
def disable
return render_error("请输入正确的流水线文件!") if params[:workflow].blank?
gitea_result = $gitea_hat_client.post_repos_actions_disable(@project&.owner&.login, @project&.identifier, {query: {workflow: params[:workflow]}}) rescue nil
if gitea_result
render_ok
else
render_error("禁用流水线失败")
end
end
def enable
return render_error("请输入正确的流水线文件!") if params[:workflow].blank?
gitea_result = $gitea_hat_client.post_repos_actions_enable(@project&.owner&.login, @project&.identifier, {query: {workflow: params[:workflow]}}) rescue nil
if gitea_result
render_ok
else
render_error("取消禁用流水线失败")
end
end
end

View File

@ -0,0 +1,4 @@
class Api::V1::Projects::Actions::BaseController < Api::V1::BaseController
before_action :require_public_and_member_above
end

View File

@ -0,0 +1,61 @@
class Api::V1::Projects::Actions::RunsController < Api::V1::Projects::Actions::BaseController
def index
@files = $gitea_client.get_repos_contents_by_owner_repo_filepath(@project&.owner&.login, @project&.identifier, ".gitea/workflows") rescue []
@has_file = @files.select { |i| i['name'] == params[:workflow] }.present?
if @has_file
@result_object = Api::V1::Projects::Actions::Runs::ListService.call(@project, {workflow: params[:workflow], page: page, limit: limit}, current_user&.gitea_token)
@begin_num = (page.to_i - 1) * limit.to_i
end
end
def create
return render_error("请输入正确的流水线文件!") if params[:workflow].blank?
return render_error("请输入正确的分支!") if params[:ref].blank?
gitea_result = $gitea_hat_client.post_repos_actions_runs_by_owner_repo(@project&.owner&.login, @project&.identifier, {query: {workflow: params[:workflow], ref: params[:ref]}})
if gitea_result
render_ok
else
ender_error("启动流水线任务失败")
end
end
def rerun
return render_error("请输入正确的流水线记录ID") if params[:run_id].blank?
gitea_result = $gitea_hat_client.post_repos_actions_runs_rerun_by_owner_repo_run(@project&.owner&.login, @project&.identifier, params[:run_id]) rescue nil
if gitea_result
render_ok
else
render_error("重启所有流水线任务失败")
end
end
def job_rerun
return render_error("请输入正确的流水线记录ID") if params[:run_id].blank?
return render_error("请输入正确的流水线任务ID") if params[:job].blank?
gitea_result = $gitea_hat_client.post_repos_actions_runs_jobs_rerun_by_owner_repo_run_job(@project&.owner&.login, @project&.identifier, params[:run_id], params[:job]) rescue nil
if gitea_result
render_ok
else
render_error("重启流水线任务失败")
end
end
def job_show
@result_object = Api::V1::Projects::Actions::Runs::JobShowService.call(@project, params[:run_id], params[:job], params[:log_cursors], current_user&.gitea_token)
end
def job_logs
return render_error("请输入正确的流水线记录ID") if params[:run_id].blank?
return render_error("请输入正确的流水线任务ID") if params[:job].blank?
domain = GiteaService.gitea_config[:domain]
api_url = GiteaService.gitea_config[:hat_base_url]
url = "/repos/#{@owner.login}/#{@repository.identifier}/actions/runs/#{CGI.escape(params[:run_id])}/jobs/#{CGI.escape(params[:job])}/logs"
file_path = [domain, api_url, url].join
file_path = [file_path, "access_token=#{@owner&.gitea_token}"].join("?")
redirect_to file_path
end
end

View File

@ -1,23 +1,48 @@
class Api::V1::Projects::BranchesController < Api::V1::BaseController class Api::V1::Projects::BranchesController < Api::V1::BaseController
before_action :require_public_and_member_above, only: [:index, :all] before_action :require_public_and_member_above, only: [:index, :all]
def gitee
url = URI("https://gitee.com/api/v5/repos/#{params[:owner]}/#{params[:repo]}/branches?access_token=#{params[:token]}&page=#{page}&per_page=#{limit}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
response = https.request(request)
render :json => response.read_body
end
def github
url = URI("https://api.github.com/repos/#{params[:owner]}/#{params[:repo]}/branches?page=#{page}&per_page=#{limit}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer #{params[:token]}"
request["Accept"] = "application/vnd.github+json"
request["X-GitHub-Api-Version"] = "2022-11-28"
response = https.request(request)
render :json => response.read_body
end
def index def index
@result_object = Api::V1::Projects::Branches::ListService.call(@project, {name: params[:keyword], page: page, limit: limit}, current_user&.gitea_token) @result_object = Api::V1::Projects::Branches::ListService.call(@project, {name: params[:keyword], state: params[:state], page: page, limit: limit}, current_user&.gitea_token)
end end
def all def all
@result_object = Api::V1::Projects::Branches::AllListService.call(@project, current_user&.gitea_token) @result_object = Api::V1::Projects::Branches::AllListService.call(@project, current_user&.gitea_token)
end end
before_action :require_operate_above, only: [:create, :destroy] before_action :require_operate_above, only: [:create, :destroy, :restore]
def create def create
@result_object = Api::V1::Projects::Branches::CreateService.call(@project, branch_params, current_user&.gitea_token) @result_object = Api::V1::Projects::Branches::CreateService.call(@project, branch_params, current_user&.gitea_token)
@project.update_column(:updated_on, Time.now)
end end
def destroy def destroy
@result_object = Api::V1::Projects::Branches::DeleteService.call(@project, params[:name], current_user&.gitea_token) @result_object = Api::V1::Projects::Branches::DeleteService.call(@project, params[:name], current_user&.gitea_token)
if @result_object if @result_object
@project.update_column(:updated_on, Time.now)
# 有开启的pr需要一同关闭 # 有开启的pr需要一同关闭
# 1、删除本仓库中存在未关闭的pr,即本仓库分支1->分支2 # 1、删除本仓库中存在未关闭的pr,即本仓库分支1->分支2
# 2、如果是fork仓库考虑删除主仓库中存在未关闭的pr,即本仓库分支1->主分支2同时分两种删除1删除本仓库分支12删除主仓库分支2 # 2、如果是fork仓库考虑删除主仓库中存在未关闭的pr,即本仓库分支1->主分支2同时分两种删除1删除本仓库分支12删除主仓库分支2
@ -33,11 +58,22 @@ class Api::V1::Projects::BranchesController < Api::V1::BaseController
end end
end end
def restore
@result_object = Api::V1::Projects::Branches::RestoreService.call(@project, params[:branch_id], params[:branch_name], current_user&.gitea_token)
if @result_object
@project.update_column(:updated_on, Time.now)
return render_ok
else
return render_error('恢复分支失败!')
end
end
before_action :require_manager_above, only: [:update_default_branch] before_action :require_manager_above, only: [:update_default_branch]
def update_default_branch def update_default_branch
@result_object = Api::V1::Projects::Branches::UpdateDefaultBranchService.call(@project, params[:name], current_user&.gitea_token) @result_object = Api::V1::Projects::Branches::UpdateDefaultBranchService.call(@project, params[:name], current_user&.gitea_token)
if @result_object if @result_object
@project.update_column(:updated_on, Time.now)
return render_ok return render_ok
else else
return render_error('更新默认分支失败!') return render_error('更新默认分支失败!')

View File

@ -1,5 +1,5 @@
class Api::V1::Projects::CommitsController < Api::V1::BaseController class Api::V1::Projects::CommitsController < Api::V1::BaseController
before_action :require_public_and_member_above, only: [:index, :diff] before_action :require_public_and_member_above, only: [:index, :diff, :recent, :files]
def index def index
@result_object = Api::V1::Projects::Commits::ListService.call(@project, {page: page, limit: limit, sha: params[:sha]}, current_user&.gitea_token) @result_object = Api::V1::Projects::Commits::ListService.call(@project, {page: page, limit: limit, sha: params[:sha]}, current_user&.gitea_token)
@ -9,4 +9,19 @@ class Api::V1::Projects::CommitsController < Api::V1::BaseController
def diff def diff
@result_object = Api::V1::Projects::Commits::DiffService.call(@project, params[:sha], current_user&.gitea_token) @result_object = Api::V1::Projects::Commits::DiffService.call(@project, params[:sha], current_user&.gitea_token)
end end
def files
if params[:filepath].present?
@result_object = $gitea_hat_client.get_repos_commits_files_by_owner_repo_sha_filepath(@project&.owner.login, @project&.identifier, params[:sha], CGI.escape(params[:filepath]), {query: {token: current_user&.gitea_token}})
else
@result_object = $gitea_hat_client.get_repos_commits_files_by_owner_repo_sha(@project&.owner.login, @project&.identifier, params[:sha], {query: {token: current_user&.gitea_token, page: page, limit: limit}})
end
end
def recent
hash = Api::V1::Projects::Commits::RecentService.call(@project, {keyword: params[:keyword], page: page, limit: limit}, current_user&.gitea_token)
@result_object = hash[:result]
@object_detail = hash[:detail]
puts @object_detail
end
end end

View File

@ -0,0 +1,58 @@
class Api::V1::Projects::CompareController < Api::V1::BaseController
before_action :require_public_and_member_above, only: [:files]
def files
load_compare_params
if params[:type] == "sha"
@compare_result ||= gitea_compare_files(@base, @head)
else
@compare_result ||= @head.include?(":") ? gitea_compare_files(@base, @head) : gitea_compare_files(@head, @base)
@merge_status, @merge_message = get_merge_message
end
end
private
def load_compare_params
@base = params[:base].include?(":") ? Addressable::URI.unescape(params[:base].split(":")[0]) + ':' + Base64.decode64(params[:base].split(":")[1]) : Base64.decode64(params[:base])
@head = params[:head].include?(":") ? Addressable::URI.unescape(params[:head].split(":")[0]) + ':' + Base64.decode64(params[:head].split(":")[1]) : Base64.decode64(params[:head])
end
def gitea_compare_files(base, head)
if params[:filepath].present?
$gitea_hat_client.get_repos_compare_by_owner_repo_baseref_headref(@project&.owner&.login, @project.identifier, Addressable::URI.escape(base), Addressable::URI.escape(head), {query: {token: current_user&.gitea_token, isFiles: true, filepath: params[:filepath]}})
else
$gitea_hat_client.get_repos_compare_by_owner_repo_baseref_headref(@project&.owner&.login, @project.identifier, Addressable::URI.escape(base), Addressable::URI.escape(head), {query: {page:page,limit:limit,token: current_user&.gitea_token, isFiles: true}})
end
end
def get_merge_message
if @base.blank? || @head.blank?
return -2, "请选择分支"
else
return -2, "目标仓库未开启合并请求PR功能" unless @project.has_menu_permission("pulls")
if @head.include?(":")
fork_project = @project.forked_projects.joins(:owner).where(users: {login: @head.to_s.split("/")[0]}).take
return -2, "请选择正确的仓库" unless fork_project.present?
@exist_pullrequest = @project.pull_requests.where(is_original: true, head: @head.to_s.split(":")[1], base: @base, status: 0, fork_project_id: fork_project.id).take
else
@exist_pullrequest = @project.pull_requests.where(is_original: false, head: @base, base: @head, status: 0).take
end
if @exist_pullrequest.present?
return -2, "在这些分支之间的合并请求已存在:<a href='/#{@owner.login}/#{@project.identifier}/pulls/#{@exist_pullrequest.id}'>#{@exist_pullrequest.try(:title)}</a>"
else
Rails.logger.info @compare_result
if params[:filepath].present?
if @compare_result["Commits"].blank? && @compare_result["Diff"].blank?
return -2, "分支内容相同,无需创建合并请求"
end
else
if @compare_result[:total_data].to_i < 1
return -2, "分支内容相同,无需创建合并请求"
end
end
end
end
return 0, "可以合并"
end
end

View File

@ -0,0 +1,51 @@
class Api::V1::Projects::DatasetsController < Api::V1::BaseController
before_action :require_public_and_member_above, only: [:show]
before_action :require_member_above, only: [:create, :update]
before_action :find_dataset, only: [:update, :show]
before_action :check_menu_authorize
def create
::Projects::Datasets::CreateForm.new(dataset_params).validate!
return render_error('该项目下已存在数据集!') if @project.project_dataset.present?
@project_dataset = ProjectDataset.new(dataset_params.merge!(project_id: @project.id))
if @project_dataset.save!
render_ok
else
render_error('创建数据集失败!')
end
rescue Exception => e
uid_logger_error(e.message)
tip_exception(e.message)
end
def update
::Projects::Datasets::CreateForm.new(dataset_params).validate!
@project_dataset.attributes = dataset_params
if @project_dataset.save!
render_ok
else
render_error("更新数据集失败!")
end
rescue Exception => e
uid_logger_error(e.message)
tip_exception(e.message)
end
def show
@attachments = kaminari_paginate(@project_dataset.attachments.includes(:author))
end
private
def dataset_params
params.permit(:title, :description, :license_id, :paper_content)
end
def find_dataset
@project_dataset = @project.project_dataset
return render_not_found unless @project_dataset.present?
end
def check_menu_authorize
return render_not_found unless @project.has_menu_permission("dataset")
end
end

View File

@ -0,0 +1,31 @@
class Api::V1::Projects::OssHealthMeasuringController < Api::V1::BaseController
def index
url = URI("#{EduSetting.get("ohm_server_url")}/api/OSS_Health_Measuring/#{params[:owner]}/#{params[:repo]}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
response = http.request(request)
render :json=> response.read_body
end
def keyid
url = URI("#{EduSetting.get("ohm_server_url")}/api/OSS_Health_Measuring/#{params[:owner]}/#{params[:repo]}/#{params[:key_id]}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
response = http.request(request)
render :json=> response.read_body
end
def can_get
url = URI("#{EduSetting.get("ohm_server_url")}/api/OHM_can_get/#{params[:owner]}/#{params[:repo]}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
response = http.request(request)
render :json=> response.read_body
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,204 @@
class Api::V1::Projects::PortraitController < Api::V1::BaseController
before_action :require_public_and_member_above
def index
Cache::V2::PlatformStatisticService.new().reset
@platform_statistic = $redis_cache.hgetall("v2-platform-statistic")
# 社区影响力
praise_count = PraiseTread.where(praise_tread_object_type: "Project", praise_tread_object_id: @project.id).count
praise_count = PraiseTread.where(praise_tread_object_type: "Project", praise_tread_object_id: @project.id).count
watcher_count = Watcher.where(watchable_type:"Project", watchable_id: @project.id).count
fork_count = ForkUser.where(project_id: @project.id).count
community_impact_praise = @platform_statistic['max-praise-count'].to_i == 0 ? 0 : 30*(praise_count.to_f/@platform_statistic['max-praise-count'].to_i)
community_impact_watcher = @platform_statistic['max-watcher-count'].to_i == 0 ? 0 : 30*(watcher_count.to_f/@platform_statistic['max-watcher-count'].to_i)
community_impact_fork = @platform_statistic['max-fork-count'].to_i == 0 ? 0 : 40*(fork_count.to_f/@platform_statistic['max-fork-count'].to_i)
community_impact = format("%.2f", community_impact_praise + community_impact_watcher + community_impact_fork)
# 项目成熟度
pullrequest_count = PullRequest.where(project_id: @project.id).count
complete_issue_count = Issue.issue_issue.where(project_id: @project.id, status_id: [3,5]).count
project_create_day = (Time.now.to_i - @project.created_on.to_i)/(3600*24)
max_project_create_day = (Time.now.to_i - Project.order("created_on desc").last.created_on.to_i)/(3600*24)
project_maturity_pullrequest = @platform_statistic['max-pullrequest-count'].to_i == 0? 0 : 40*(pullrequest_count.to_f/@platform_statistic['max-pullrequest-count'].to_i)
project_maturity_complete_issue = @platform_statistic['max-complete-issue-count'].to_i == 0? 0 : 40*(complete_issue_count.to_f/@platform_statistic['max-complete-issue-count'].to_i)
project_maturity_project_create_day = max_project_create_day.to_i <= 0 || project_create_day.to_i <= 0 ? 0 : 20*(Math.sqrt(project_create_day).to_f/Math.sqrt(max_project_create_day))
project_maturity = format("%.2f", project_maturity_pullrequest + project_maturity_complete_issue + project_maturity_project_create_day)
# 项目健康度
member_count = Member.where(project_id: @project.id).count
max_member_count = @platform_statistic['max-member-count'].to_i
project_last_commit = CommitLog.joins(:project).merge(Project.common).where(project_id: @project.id).order("created_at desc").first
last_commit_day = project_last_commit.present? ? (Time.now.to_i - project_last_commit.created_at.to_i)/(3600*24) : 0
has_license = @project.license.present? ? 1 : 0
closed_pullrequest_count = PullRequest.where(project_id: @project.id).merged_and_closed.count
closed_issue_count = Issue.issue_issue.where(project_id: @project.id).closed.count
pullrequest_count = PullRequest.where(project_id: @project.id).count
issue_count = Issue.issue_issue.where(project_id: @project.id).count
health_code1 = max_member_count.to_i == 0 ? 0 : 0.3*(member_count.to_f/max_member_count)
health_code2 = last_commit_day.to_i == 0 ? 0 : 0.7*(1.to_f/(1+last_commit_day))
health_code = 10 * (health_code1 + health_code2)
health_license = 10 * has_license
health_pullrequest = pullrequest_count <= 1 ? 0 : 40 * (closed_pullrequest_count.to_f/pullrequest_count)*(1-1/Math.sqrt(pullrequest_count+1))
health_issue = issue_count <= 1 ? 0 : 40 * (closed_issue_count.to_f/issue_count)*(1-1/Math.sqrt(issue_count+1))
project_health = format("%.2f", health_code + health_license + health_pullrequest + health_issue)
# 团队影响度
member_count = Member.where(project_id: @project.id).count
max_member_count = @platform_statistic['max-member-count'].to_i
recent_one_month_member_count = Member.where(project_id:@project.id).where("created_on >?", Time.now - 30.days).count
max_recent_one_month_member_count = @platform_statistic['max-recent-one-month-member-count'].to_i
issue_assigner_count = IssueAssigner.joins(:issue).merge(Issue.issue_issue).where(issues: {project_id: @project.id}).distinct.count
team_impact_member = 40*(member_count.to_f/max_member_count)
team_impact_recent_member = 40*(recent_one_month_member_count.to_f/max_recent_one_month_member_count)
team_impact_issue_assigner = 20*(issue_assigner_count.to_f/max_member_count)
team_impact = format("%.2f", team_impact_member + team_impact_recent_member + team_impact_issue_assigner)
# 开发活跃度
recent_one_month_commit_count = CommitLog.joins(:project).merge(Project.common).where(project_id: @project.id).where("created_at >?", Time.now - 30.days).count
recent_one_month_pullrequest_count = PullRequest.where(project_id: @project.id).where("created_at >?", Time.now - 30.days).count
recent_one_month_issue_count = Issue.issue_issue.where(project_id: @project.id).where("created_on >?", Time.now - 30.days).count
recent_one_month_release_count = VersionRelease.joins(:repository).where(repositories: {project_id: @project.id}).where("created_at >?", Time.now - 30.days).count
max_recent_one_month_commit_count = @platform_statistic['max-recent-one-month-commit-count'].to_i
max_recent_one_month_pullrequest_count = @platform_statistic['max-recent-one-month-pullrequest-count'].to_i
max_recent_one_month_issue_count = @platform_statistic['max-recent-one-month-issue-count'].to_i
max_recent_one_month_release_count = @platform_statistic['max-recent-one-month-release-count'].to_i
develop_activity_commit = max_recent_one_month_commit_count.zero? ? 0 : 40*(recent_one_month_commit_count.to_f/max_recent_one_month_commit_count)
develop_activity_issue = max_recent_one_month_issue_count.zero? ? 0 : 20*(recent_one_month_issue_count.to_f/max_recent_one_month_issue_count)
develop_activity_pullrequest = max_recent_one_month_pullrequest_count.zero? ? 0 : 20*(recent_one_month_pullrequest_count.to_f/max_recent_one_month_pullrequest_count)
develop_activity_release = max_recent_one_month_release_count.zero? ? 0 : 20*(recent_one_month_release_count.to_f/max_recent_one_month_release_count)
develop_activity = format("%.2f", develop_activity_commit + develop_activity_issue + develop_activity_pullrequest + develop_activity_release)
render :json => {community_impact: community_impact, project_maturity: project_maturity, project_health: project_health, team_impact: team_impact, develop_activity: develop_activity}
end
# 社区影响力
def community_impact
Cache::V2::PlatformStatisticService.new().reset
@platform_statistic = $redis_cache.hgetall("v2-platform-statistic")
praise_count = PraiseTread.where(praise_tread_object_type: "Project", praise_tread_object_id: @project.id).count
watcher_count = Watcher.where(watchable_type:"Project", watchable_id: @project.id).count
fork_count = ForkUser.where(project_id: @project.id).count
community_impact_praise = @platform_statistic['max-praise-count'].to_i == 0 ? 0 : 30*(praise_count.to_f/@platform_statistic['max-praise-count'].to_i)
community_impact_watcher = @platform_statistic['max-watcher-count'].to_i == 0 ? 0 : 30*(watcher_count.to_f/@platform_statistic['max-watcher-count'].to_i)
community_impact_fork = @platform_statistic['max-fork-count'].to_i == 0 ? 0 : 40*(fork_count.to_f/@platform_statistic['max-fork-count'].to_i)
community_impact = format("%.2f", community_impact_praise + community_impact_watcher + community_impact_fork)
render :json => {
community_impact_praise: community_impact_praise,
community_impact_watcher: community_impact_watcher,
community_impact_fork: community_impact_fork,
community_impact: community_impact
}
end
# 项目成熟度
def project_maturity
Cache::V2::PlatformStatisticService.new().reset
@platform_statistic = $redis_cache.hgetall("v2-platform-statistic")
pullrequest_count = PullRequest.where(project_id: @project.id).count
complete_issue_count = Issue.issue_issue.where(project_id: @project.id, status_id: [3,5]).count
project_create_day = (Time.now.to_i - @project.created_on.to_i)/(3600*24)
max_project_create_day = (Time.now.to_i - Project.order("created_on desc").last.created_on.to_i)/(3600*24)
project_maturity_pullrequest = @platform_statistic['max-pullrequest-count'].to_i == 0? 0 : 40*(pullrequest_count.to_f/@platform_statistic['max-pullrequest-count'].to_i)
project_maturity_complete_issue = @platform_statistic['max-complete-issue-count'].to_i == 0? 0 : 40*(complete_issue_count.to_f/@platform_statistic['max-complete-issue-count'].to_i)
project_maturity_project_create_day = max_project_create_day.to_i <= 0 || project_create_day.to_i <= 0 ? 0 : 20*(Math.sqrt(project_create_day).to_f/Math.sqrt(max_project_create_day))
project_maturity = format("%.2f", project_maturity_pullrequest + project_maturity_complete_issue + project_maturity_project_create_day)
render :json => {
project_maturity_pullrequest: project_maturity_pullrequest,
project_maturity_complete_issue: project_maturity_complete_issue,
project_maturity_project_create_day: project_maturity_project_create_day,
project_maturity: project_maturity
}
end
# 项目健康度
def project_health
Cache::V2::PlatformStatisticService.new().reset
@platform_statistic = $redis_cache.hgetall("v2-platform-statistic")
member_count = Member.where(project_id: @project.id).count
max_member_count = @platform_statistic['max-member-count'].to_i
project_last_commit = CommitLog.joins(:project).merge(Project.common).where(project_id: @project.id).order("created_at desc").first
last_commit_day = project_last_commit.present? ? (Time.now.to_i - project_last_commit.created_at.to_i)/(3600*24) : 0
has_license = @project.license.present? ? 1 : 0
closed_pullrequest_count = PullRequest.where(project_id: @project.id, status: 1).count
closed_issue_count = Issue.issue_issue.where(project_id: @project.id, status_id: [3,5]).count
pullrequest_count = PullRequest.where(project_id: @project.id).count
issue_count = Issue.issue_issue.where(project_id: @project.id).count
health_code1 = max_member_count.to_i == 0 ? 0 : 0.3*(member_count.to_f/max_member_count)
health_code2 = last_commit_day.to_i == 0 ? 0 : 0.7*(1.to_f/(1+last_commit_day*0.1))
health_code = 10 * (health_code1 + health_code2)
health_license = 10 * has_license
health_pullrequest = pullrequest_count <= 1 ? 0 : 40 * (closed_pullrequest_count.to_f/pullrequest_count)*(1-1/Math.sqrt(pullrequest_count+1))
health_issue = issue_count <= 1 ? 0 : 40 * (closed_issue_count.to_f/issue_count)*(1-1/Math.sqrt(issue_count+1))
project_health = format("%.2f", health_code + health_license + health_pullrequest + health_issue)
render :json => {
health_code: health_code,
health_license: health_license,
health_pullrequest: health_pullrequest,
health_issue: health_issue,
project_health: project_health
}
end
# 团队健康度
def team_impact
Cache::V2::PlatformStatisticService.new().reset
@platform_statistic = $redis_cache.hgetall("v2-platform-statistic")
member_count = Member.where(project_id: @project.id).count
max_member_count = @platform_statistic['max-member-count'].to_i
recent_one_month_member_count = Member.where(project_id:@project.id).where("created_on >?", Time.now - 30.days).count
max_recent_one_month_member_count = @platform_statistic['max-recent-one-month-member-count'].to_i
issue_assigner_count = IssueAssigner.joins(:issue).merge(Issue.issue_issue).where(issues: {project_id: @project.id}).distinct.count
project_member_count = @project.owner.is_a?(User) ? member_count : @project.owner.organization_users.count
team_impact_member = 40*(member_count.to_f/max_member_count)
team_impact_recent_member = 40*(recent_one_month_member_count.to_f/max_recent_one_month_member_count)
team_impact_issue_assigner = 20*(issue_assigner_count.to_f/project_member_count)
team_impact = format("%.2f", team_impact_member + team_impact_recent_member + team_impact_issue_assigner)
render :json => {
team_impact_member: team_impact_member,
team_impact_recent_member: team_impact_recent_member,
team_impact_issue_assigner: team_impact_issue_assigner,
team_impact: team_impact
}
end
# 开发活跃度
def develop_activity
Cache::V2::PlatformStatisticService.new().reset
@platform_statistic = $redis_cache.hgetall("v2-platform-statistic")
recent_one_month_commit_count = CommitLog.joins(:project).merge(Project.common).where(project_id: @project.id).where("created_at >?", Time.now - 30.days).count
recent_one_month_pullrequest_count = PullRequest.where(project_id: @project.id).where("created_at >?", Time.now - 30.days).count
recent_one_month_issue_count = Issue.issue_issue.where(project_id: @project.id).where("created_on >?", Time.now - 30.days).count
recent_one_month_release_count = VersionRelease.joins(:repository).where(repositories: {project_id: @project.id}).where("created_at >?", Time.now - 30.days).count
max_recent_one_month_commit_count = @platform_statistic['max-recent-one-month-commit-count'].to_i
max_recent_one_month_pullrequest_count = @platform_statistic['max-recent-one-month-pullrequest-count'].to_i
max_recent_one_month_issue_count = @platform_statistic['max-recent-one-month-issue-count'].to_i
max_recent_one_month_release_count = @platform_statistic['max-recent-one-month-release-count'].to_i
develop_activity_commit = max_recent_one_month_commit_count.zero? ? 0 : 40*(recent_one_month_commit_count.to_f/max_recent_one_month_commit_count)
develop_activity_issue = max_recent_one_month_issue_count.zero? ? 0 : 20*(recent_one_month_issue_count.to_f/max_recent_one_month_issue_count)
develop_activity_pullrequest = max_recent_one_month_pullrequest_count.zero? ? 0 : 20*(recent_one_month_pullrequest_count.to_f/max_recent_one_month_pullrequest_count)
develop_activity_release = max_recent_one_month_release_count.zero? ? 0 : 20*(recent_one_month_release_count.to_f/max_recent_one_month_release_count)
develop_activity = format("%.2f", develop_activity_commit + develop_activity_issue + develop_activity_pullrequest + develop_activity_release)
render :json => {
develop_activity_commit: develop_activity_commit,
develop_activity_issue: develop_activity_issue,
develop_activity_pullrequest: develop_activity_pullrequest,
develop_activity_release: develop_activity_release,
develop_activity: develop_activity
}
end
end

View File

@ -6,13 +6,21 @@ class Api::V1::Projects::Pulls::PullsController < Api::V1::BaseController
@pulls = kaminari_paginate(@pulls) @pulls = kaminari_paginate(@pulls)
end end
before_action :load_pull_request, only: [:show] before_action :load_pull_request, only: [:show, :files]
def show def show
@result_object = Api::V1::Projects::Pulls::GetService.call(@project, @pull_request, current_user&.gitea_token) @result_object = Api::V1::Projects::Pulls::GetService.call(@project, @pull_request, current_user&.gitea_token)
@last_review = @pull_request.reviews.order(created_at: :desc).take @last_review = @pull_request.reviews.order(created_at: :desc).take
end end
def files
if params[:filepath].present?
@result_object = $gitea_hat_client.get_repos_pulls_files_by_owner_repo_index_filepath(@project&.owner.login, @project&.identifier, @pull_request.gitea_number, CGI.escape(params[:filepath]), {query: {token: current_user&.gitea_token}})
else
@result_object = $gitea_hat_client.get_repos_pulls_files_by_owner_repo_index(@project&.owner.login, @project&.identifier, @pull_request.gitea_number, {query: {isNew: "true",token: current_user&.gitea_token, page: page, limit: limit}})
end
end
private private
def query_params def query_params
params.permit(:status, :keyword, :priority_id, :issue_tag_id, :version_id, :reviewer_id, :sort_by, :sort_direction) params.permit(:status, :keyword, :priority_id, :issue_tag_id, :version_id, :reviewer_id, :sort_by, :sort_direction)

View File

@ -0,0 +1,148 @@
class Api::V1::Projects::SyncRepositoriesController < Api::V1::BaseController
before_action :require_public_and_member_above, except: [:sync]
before_action :load_project, only: [:sync]
def index
@sync_repositories = @project.sync_repositories
@group_sync_repository = @project.sync_repositories.group(:type, :external_repo_address, :sync_granularity, :external_token).count
end
def create
@sync_repository1, @sync_repository2, @sync_repository_branch1, @sync_repository_branch2 = Api::V1::Projects::SyncRepositories::CreateService.call(@project, sync_repository_params)
rescue Exception => e
uid_logger_error(e.message)
tip_exception(e.message)
end
def update_info
return render_error("请输入正确的同步仓库ID") unless params[:sync_repository_ids].present?
Api::V1::Projects::SyncRepositories::UpdateService.call(@project, params[:sync_repository_ids], sync_repository_update_params)
render_ok
rescue Exception => e
uid_logger_error(e.message)
tip_exception(e.message)
end
def sync
return render_error("请输入正确的同步方向!") if params[:sync_direction].blank?
if params[:repo_type].present?
@sync_repositories = SyncRepository.where(project: @project, type: params[:repo_type], sync_direction: params[:sync_direction])
else
@sync_repositories = SyncRepository.where(project: @project, sync_direction: params[:sync_direction])
end
branch = params[:payload].present? ? JSON.parse(params[:payload])["ref"].split("/")[-1] : params[:ref].split("/")[-1] rescue nil
if params[:sync_direction].to_i == 1
@sync_repository_branches = SyncRepositoryBranch.where(sync_repository_id: @sync_repositories, gitlink_branch_name: branch, enable: true)
else
@sync_repository_branches = SyncRepositoryBranch.where(sync_repository_id: @sync_repositories, external_branch_name: branch, enable: true)
end
# 全部分支同步暂时不做
# @sync_repositories.each do |item|
# TouchSyncJob.perform_later(item)
# end
@sync_repository_branches.each do |item|
TouchSyncJob.set(wait: 5.seconds).perform_later(item)
end
rescue Exception => e
uid_logger_error(e.message)
tip_exception(e.message)
end
def unbind
return render_error("请输入正确的同步仓库ID") unless params[:sync_repository_ids].present?
@sync_repositories = SyncRepository.where(id: params[:sync_repository_ids].split(","))
@sync_repositories.each do |repo|
# Reposync::DeleteRepoService.call(repo.repo_name) # 解绑操作放在回调里
Api::V1::Projects::Webhooks::DeleteService.call(@project, repo.webhook_gid)
repo.destroy
end
render_ok
rescue Exception => e
uid_logger_error(e.message)
tip_exception(e.message)
end
def change_enable
return render_error("请输入正确的仓库类型") if params[:repo_type].blank?
return render_error("请输入正确的分支名称") if params[:gitlink_branch_name].blank? || params[:external_branch_name].blank?
# return render_error("请输入正确的状态") if params[:enable].blank?
@sync_repository_branches = SyncRepositoryBranch.joins(:sync_repository).where(sync_repositories: {project_id: @project.id, type: params[:repo_type]}, gitlink_branch_name: params[:gitlink_branch_name], external_branch_name: params[:external_branch_name])
if @sync_repository_branches.update_all({enable: params[:enable]})
@sync_repository_branches.each do |branch|
branch_sync_direction = branch&.sync_repository&.sync_direction.to_i
if branch_sync_direction == 1
Reposync::UpdateBranchStatusService.call(branch&.sync_repository&.repo_name, branch.gitlink_branch_name, params[:enable])
else
Reposync::UpdateBranchStatusService.call(branch&.sync_repository&.repo_name, branch.external_branch_name, params[:enable])
end
TouchSyncJob.perform_later(branch) if params[:enable] && branch_sync_direction == params[:first_sync_direction].to_i
end
render_ok
else
render_error("更新失败!")
end
rescue Exception => e
uid_logger_error(e.message)
tip_exception(e.message)
end
def create_branch
return render_error("请输入正确的同步仓库ID") unless params[:sync_repository_ids].present?
return render_error("请输入正确的Gitlink分支名称") unless params[:gitlink_branch_name].present?
return render_error("请输入正确的外部仓库分支名称") unless params[:external_branch_name].present?
return render_error("请输入正确的首次同步方向") unless params[:first_sync_direction].present?
params[:sync_repository_ids].split(",").each do |id|
repo = SyncRepository.find_by_id id
branch = Reposync::CreateSyncBranchService.call(repo.repo_name, params[:gitlink_branch_name], params[:external_branch_name])
return render_error(branch[2]) if branch[0].to_i !=0
sync_branch = SyncRepositoryBranch.create!(sync_repository_id: id, gitlink_branch_name: params[:gitlink_branch_name], external_branch_name: params[:external_branch_name], reposync_branch_id: branch[1]['id'])
TouchSyncJob.perform_later(sync_branch) if params[:first_sync_direction].to_i == repo.sync_direction
end
render_ok
rescue Exception => e
uid_logger_error(e.message)
tip_exception(e.message)
end
def branches
return render_error("请输入正确的同步仓库ID") unless params[:sync_repository_ids].present?
@sync_repository_branches = SyncRepositoryBranch.where(sync_repository_id: params[:sync_repository_ids].split(","))
@sync_repository_branches = @sync_repository_branches.ransack(gitlink_branch_name_or_external_branch_name_cont: params[:branch_name]).result if params[:branch_name].present?
@group_sync_repository_branch = @sync_repository_branches.joins(:sync_repository).group("sync_repositories.type, sync_repository_branches.gitlink_branch_name, sync_repository_branches.external_branch_name").select("sync_repositories.type as type,max(sync_repository_branches.updated_at) as updated_at, sync_repository_branches.gitlink_branch_name, sync_repository_branches.external_branch_name").sort_by{|i|i.updated_at}
@each_json = []
@group_sync_repository_branch.each do |item|
branches = @sync_repository_branches.joins(:sync_repository).where(sync_repositories: {type: item.type}, gitlink_branch_name: item.gitlink_branch_name, external_branch_name: item.external_branch_name).order(sync_time: :desc)
branch = branches.first
@each_json << {
gitlink_branch_name: item.gitlink_branch_name,
external_branch_name: item.external_branch_name,
type: branch&.sync_repository&.type,
sync_time: branch.sync_time.present? ? branch.sync_time.strftime("%Y-%m-%d %H:%M:%S") : nil,
sync_status: branch.sync_status,
enable: branch.enable,
enable_num: branch.enable ? 1 : 0,
created_at: branch.created_at.to_i,
reposync_branch_ids: branches.pluck(:reposync_branch_id)
}
end
@each_json = @each_json.sort_by{|h| [-h[:enable_num], h[:created_at]]}
render :json => {total_count: @group_sync_repository_branch.count, sync_repository_branches: @each_json}
end
def history
return render_error("请输入正确的同步分支ID") unless params[:reposync_branch_ids]
@branch = SyncRepositoryBranch.find_by(reposync_branch_id: params[:reposync_branch_ids].split(",")[0])
_, @reposync_branch_logs, @total_count, _ = Reposync::GetLogsService.call(nil, params[:reposync_branch_ids], page, limit)
end
private
def sync_repository_params
params.permit(:type, :external_token, :external_repo_address, :sync_granularity, :external_branch_name, :gitlink_branch_name, :first_sync_direction)
end
def sync_repository_update_params
params.permit(:external_token, :external_repo_address)
end
end

View File

@ -1,10 +1,13 @@
class Api::V1::Projects::TagsController < Api::V1::BaseController class Api::V1::Projects::TagsController < Api::V1::BaseController
before_action :require_public_and_member_above, only: [:index] before_action :require_public_and_member_above, only: [:index, :show]
def index def index
@release_tags = @repository.version_releases.pluck(:tag_name) @release_tags = @repository.version_releases.pluck(:tag_name)
@result_object = Api::V1::Projects::Tags::ListService.call(@project, {page: page, limit: limit}, current_user&.gitea_token) @result_object = Api::V1::Projects::Tags::ListService.call(@project, {page: page, limit: limit}, current_user&.gitea_token)
puts @result_object end
def show
@result_object = Api::V1::Projects::Tags::GetService.call(@project, params[:name], current_user&.gitea_token)
end end
before_action :require_operate_above, only: [:destroy] before_action :require_operate_above, only: [:destroy]

View File

@ -1,5 +1,5 @@
class Api::V1::ProjectsController < Api::V1::BaseController class Api::V1::ProjectsController < Api::V1::BaseController
before_action :require_public_and_member_above, only: [:show, :compare, :blame] before_action :require_public_and_member_above, only: [:show, :compare, :blame, :sonar_search]
def index def index
render_ok render_ok
@ -9,6 +9,7 @@ class Api::V1::ProjectsController < Api::V1::BaseController
@result_object = Api::V1::Projects::GetService.call(@project, current_user.gitea_token) @result_object = Api::V1::Projects::GetService.call(@project, current_user.gitea_token)
end end
def compare def compare
@result_object = Api::V1::Projects::CompareService.call(@project, params[:from], params[:to], current_user&.gitea_token) @result_object = Api::V1::Projects::CompareService.call(@project, params[:from], params[:to], current_user&.gitea_token)
end end

View File

@ -0,0 +1,208 @@
class Api::V1::SonarqubesController < Api::V1::BaseController
before_action :load_repository
include Repository::LanguagesPercentagable
include SonarService
def sonar_initialize
gitea_params = { has_actions: params[:has_actions] == 'true' ? true :false }
gitea_setting = Gitea::Repository::UpdateService.call(@owner, @project.identifier, gitea_params)
if gitea_setting['has_actions'] == true
Gitea::Repository::ActionSecretsService.new(@owner, @project.identifier, 'SONAR_HOST_URL', Rails.application.config_for(:configuration)['sonarqube']['url'] ).call
Gitea::Repository::ActionSecretsService.new(@owner, @project.identifier, 'SONAR_TOKEN', Rails.application.config_for(:configuration)['sonarqube']['secret'] ).call
else
Gitea::Repository::ActionSecretsService.new(@owner, @project.identifier, 'SONAR_HOST_URL', Rails.application.config_for(:configuration)['sonarqube']['url'] ).destroy
Gitea::Repository::ActionSecretsService.new(@owner, @project.identifier, 'SONAR_TOKEN', Rails.application.config_for(:configuration)['sonarqube']['secret'] ).destroy
end
@project.update(gitea_params)
render_ok
end
def insert_file
checkout_url = 'https://gitlink.org.cn/KingChan/checkout@v4'
scanner_url = 'https://gitlink.org.cn/KingChan/sonarqube-scan-action@master'
doxygen_url = "https://gitlink.gitlink.net"
begin
config = Rails.application.config_for(:configuration)
sonarqube_config = config.dig('sonarqube')
if sonarqube_config.present? && sonarqube_config['checkout'].present?
checkout_url = sonarqube_config['checkout']
end
if sonarqube_config.present? && sonarqube_config['scanner'].present?
scanner_url = sonarqube_config['scanner']
end
if sonarqube_config.present? && sonarqube_config['doxygen'].present?
doxygen_url = sonarqube_config['doxygen']
end
raise 'sonar config missing' if sonarqube_config.blank?
rescue => ex
raise ex if Rails.env.production?
puts %Q{\033[33m [warning] soanrqube config or configuration.yml missing,
please add it or execute 'cp config/configuration.yml.example config/configuration.yml' \033[0m}
end
sonar_scanner_content = {
filepath: '.gitea/workflows/SonarScanner.yaml',
branch: params[:branch],
new_branch: nil,
content: "
on:
# Trigger analysis when pushing to your main branches, and when creating a pull request.
push:
branches:
- main
- master
- develop
- 'releases/**'
pull_request:
types: [opened, synchronize, reopened]
name: Main Workflow
jobs:
sonarqube:
runs-on: ubuntu-latest
steps:
- uses: #{checkout_url}
with:
# Disabling shallow clones is recommended for improving the relevancy of reporting
fetch-depth: 0
- name: curl doxygen
run: |
curl -X GET #{doxygen_url}/generate?repo=#{@project.repository.url}
- name: SonarQube Scan
uses: #{scanner_url}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
",
message: 'Add .gitea/workflows/SonarScanner.yaml',
committer: {
email: @owner.mail,
name: @owner.login
},
identifier: @project.identifier
}
@path = GiteaService.gitea_config[:domain]+"/#{@project.owner.login}/#{@project.identifier}/raw/branch/#{params[:branch]}/"
sonar_scanner_exit = Repositories::EntriesInteractor.call(@owner, @project.identifier, '.gitea/workflows/SonarScanner.yaml', ref: params[:branch])
if sonar_scanner_exit.success?
Gitea::UpdateFileInteractor.call(@owner.gitea_token, @owner.login, sonar_scanner_content.merge(sha:sonar_scanner_exit.result['sha']))
else
sonar_scanner_content[:content] = Base64.strict_encode64(sonar_scanner_content[:content])
Gitea::CreateFileInteractor.call(@owner.gitea_token, @owner.login, sonar_scanner_content)
end
sonar_content = build_sonar_content(params[:owner], @project.id, languages_precentagable.keys)
sonar_project_content = {
filepath: 'sonar-project.properties',
branch: params[:branch],
new_branch: nil,
"content": sonar_content,
"message": 'Add sonar-project.properties',
committer: {
email: @owner.mail,
name: @owner.login
},
identifier: @project.identifier
}
sonar_project_exit = Repositories::EntriesInteractor.call(@owner, @project.identifier, 'sonar-project.properties', ref: params[:branch])
if sonar_project_exit.success?
Gitea::UpdateFileInteractor.call(@owner.gitea_token, @owner.login, sonar_project_content.merge(sha:sonar_project_exit.result['sha']))
else
sonar_project_content[:content] = Base64.strict_encode64(sonar_project_content[:content])
Gitea::CreateFileInteractor.call(@owner.gitea_token, @owner.login, sonar_project_content)
end
render_ok
end
def issues_search
params_data = {
components: "#{params[:owner]}-#{@project.id}",
s: params[:s],
impactSoftwareQualities: params[:impactSoftwareQualities],
issueStatuses: params[:issueStatuses],
ps: params[:ps],
p: params[:p],
facets: params[:facets],
additionalFields: params[:additionalFields],
timeZone: params[:timeZone],
types: params[:types],
impactSeverities: params[:impactSeverities],
tags: params[:tags]
}
data = Sonarqube.client.get('/api/issues/search', query: params_data)
render_ok data
end
def ce_component
params_data = {
components: "#{params[:owner]}-#{@project.id}",
}
data = Sonarqube.client.get('/api/ce/component', query: params_data)
render_ok data
end
def sources_issue_snippet
params_data = {
issueKey: params[:issueKey]
}
data = Sonarqube.client.get('/api/sources/issue_snippets', query: params_data)
render_ok data
end
def rules_show
params_data = {
key: params[:key]
}
data = Sonarqube.client.get('/api/rules/show', query: params_data)
render_ok data
end
def doxygen_url
config = Rails.application.config_for(:configuration)
sonarqube_config = config.dig('sonarqube')
doxygen_url = sonarqube_config['doxygen']
data = {doxygen_url: "#{doxygen_url}/files/#{@project.owner.login}/#{@project.identifier}/html/"}
render_ok data
end
def analyze_doxygen
config = Rails.application.config_for(:configuration)
sonarqube_config = config.dig('sonarqube')
doxygen_url = sonarqube_config['doxygen']
url = "#{doxygen_url}/files/#{@project.owner.login}/#{@project.identifier}/html/analyze_doxygen.json"
uri = URI.parse(url)
response = Net::HTTP.get_response(uri)
if response.code.to_i != 200
puts "======= 接口请求失败!"
data = { data: nil, msg: '文件不存在' }
else
data = { data: JSON.parse(response.body), msg: 'ok' }
end
render_ok data
end
def measures_search_history
params_data = {
from: params[:form],
component: "#{params[:owner]}-#{@project.id}",
metrics: params[:metrics],
ps: params[:ps]
}
data = Sonarqube.client.get('/api/measures/search_history', query: params_data)
render_ok data
end
def measures_component
params_data = {
component: "#{params[:owner]}-#{@project.id}",
additionalFields: params[:additionalFields],
metricKeys: params[:metricKeys]
}
data = Sonarqube.client.get('/api/measures/component', query: params_data)
render_ok data
end
end

View File

@ -0,0 +1,23 @@
class Api::V1::Users::HomeTopSettingsController < Api::V1::BaseController
before_action :load_observe_user
before_action :check_auth_for_observe_user
def create
@result = Api::V1::Users::HomeTopSettings::CreateService.call(@observe_user, home_top_setting_params)
return render_error("置顶失败.") if @result.nil?
return render_ok
end
def cancel
@result = Api::V1::Users::HomeTopSettings::DeleteService.call(@observe_user, home_top_setting_params)
return render_error("取消置顶失败.") if @result.nil?
return render_ok
end
private
def home_top_setting_params
params.permit(:top_type, :top_id)
end
end

View File

@ -8,6 +8,6 @@ class Api::V1::Users::ProjectsController < Api::V1::BaseController
private private
def query_params def query_params
params.permit(:category, :is_public, :project_type, :sort_by, :sort_direction, :search) params.permit(:category, :is_public, :project_type, :sort_by, :sort_direction, :search, :start_at, :end_at)
end end
end end

View File

@ -1,4 +1,5 @@
class Api::V1::UsersController < Api::V1::BaseController class Api::V1::UsersController < Api::V1::BaseController
include AesCryptHelper
before_action :load_observe_user, except: [:check_user_id, :check_user_login] before_action :load_observe_user, except: [:check_user_id, :check_user_login]
before_action :check_auth_for_observe_user, except: [:check_user_id, :check_user_login] before_action :check_auth_for_observe_user, except: [:check_user_id, :check_user_login]
@ -53,7 +54,7 @@ class Api::V1::UsersController < Api::V1::BaseController
end end
def check_password def check_password
password = params[:password] password = decrypt(params[:password]) rescue params[:password].to_s
return tip_exception(-5, "8~16位密码支持字母数字和符号") unless password =~ CustomRegexp::PASSWORD return tip_exception(-5, "8~16位密码支持字母数字和符号") unless password =~ CustomRegexp::PASSWORD
return tip_exception(-5, "密码错误") unless @observe_user.check_password?(password) return tip_exception(-5, "密码错误") unless @observe_user.check_password?(password)
render_ok render_ok
@ -115,4 +116,29 @@ class Api::V1::UsersController < Api::V1::BaseController
return render_error('更改手机号失败!') return render_error('更改手机号失败!')
end end
end end
def check_user_can_delete
org_ids = TeamUser.where(user_id: @observe_user.id).pluck(:organization_id) | OrganizationUser.where(user_id: @observe_user.id).pluck(:organization_id)
org_count = TeamUser.where(organization_id: org_ids).where(user_id: @observe_user.id).joins(:team).where(teams: {authorize: %w(owner)}).count
project_count = Project.where(user_id: @observe_user.id).count
render_ok({ can_delete: org_count == 0 && project_count == 0, org_count: org_count, project_count: project_count })
end
def destroy
password = decrypt(params[:password]) rescue params[:password].to_s
return tip_exception(-1, "密码不正确.") unless @observe_user.check_password?(password)
org_ids = TeamUser.where(user_id: @observe_user.id).pluck(:organization_id) | OrganizationUser.where(user_id: @observe_user.id).pluck(:organization_id)
org_count = TeamUser.where(organization_id: org_ids).where(user_id: @observe_user.id).joins(:team).where(teams: {authorize: %w(owner)}).count
project_count = Project.where(user_id: @observe_user.id).count
return tip_exception(-1, "当前账号名下存在拥有的组织/代码库,请先删除或转让后再尝试注销操作.") if org_count > 0 || project_count > 0
UserAction.create(action_id: @observe_user.id, action_type: "DestroyUser", user_id: @observe_user.id, :ip => request.remote_ip, data_bank: @observe_user.attributes.to_json, memo: params[:memo])
@result_object = Api::V1::Users::DeleteUserService.call(@observe_user)
if @result_object
return render_ok
else
return render_error('删除失败!')
end
end
end end

View File

@ -75,7 +75,11 @@ class ApplicationController < ActionController::Base
def admin_or_business? def admin_or_business?
User.current.admin? || User.current.business? User.current.admin? || User.current.business?
end
def admin_or_glcc_admin?
User.current.admin? || User.current.glcc_admin?
end end
# 判断用户的邮箱或者手机是否可用 # 判断用户的邮箱或者手机是否可用
@ -195,6 +199,10 @@ class ApplicationController < ActionController::Base
normal_status(403, "") unless admin_or_business? normal_status(403, "") unless admin_or_business?
end end
def require_glcc_admin
normal_status(403, "") unless admin_or_glcc_admin?
end
# 前端会捕捉401,弹登录弹框 # 前端会捕捉401,弹登录弹框
# 未授权的捕捉407弹试用申请弹框 # 未授权的捕捉407弹试用申请弹框
def require_login def require_login
@ -202,6 +210,10 @@ class ApplicationController < ActionController::Base
tip_exception(401, "请登录后再操作") unless User.current.logged? tip_exception(401, "请登录后再操作") unless User.current.logged?
end end
def require_referer
tip_exception(403, "你没有权限访问") if request.host.present? && !request.referer.to_s.include?(request.host.to_s.gsub("www.",""))
end
def require_login_or_token def require_login_or_token
if params[:token].present? if params[:token].present?
user = User.try_to_autologin(params[:token]) user = User.try_to_autologin(params[:token])
@ -318,19 +330,19 @@ class ApplicationController < ActionController::Base
User.current = find_current_user User.current = find_current_user
uid_logger("user_setup: " + (User.current.logged? ? "#{User.current.try(:login)} (id=#{User.current.try(:id)})" : "anonymous")) uid_logger("user_setup: " + (User.current.logged? ? "#{User.current.try(:login)} (id=#{User.current.try(:id)})" : "anonymous"))
# 开放课程通过链接访问的用户 # # 开放课程通过链接访问的用户
if !User.current.logged? && !params[:chinaoocTimestamp].blank? && !params[:websiteName].blank? && !params[:chinaoocKey].blank? # if !User.current.logged? && !params[:chinaoocTimestamp].blank? && !params[:websiteName].blank? && !params[:chinaoocKey].blank?
content = "#{OPENKEY}#{params[:websiteName]}#{params[:chinaoocTimestamp]}" # content = "#{OPENKEY}#{params[:websiteName]}#{params[:chinaoocTimestamp]}"
#
if Digest::MD5.hexdigest(content) == params[:chinaoocKey] # if Digest::MD5.hexdigest(content) == params[:chinaoocKey]
user = open_class_user # user = open_class_user
if user # if user
start_user_session(user) # start_user_session(user)
set_autologin_cookie(user) # set_autologin_cookie(user)
end # end
User.current = user # User.current = user
end # end
end # end
if !User.current.logged? && Rails.env.development? if !User.current.logged? && Rails.env.development?
user = User.find 1 user = User.find 1
@ -363,15 +375,14 @@ class ApplicationController < ActionController::Base
uid_logger("user setup start: session[:user_id] is #{session[:user_id]}") uid_logger("user setup start: session[:user_id] is #{session[:user_id]}")
uid_logger("0000000000000user setup start: default_yun_session is #{default_yun_session}, session[:current_user_id] is #{session[:"#{default_yun_session}"]}") uid_logger("0000000000000user setup start: default_yun_session is #{default_yun_session}, session[:current_user_id] is #{session[:"#{default_yun_session}"]}")
current_domain_session = session[:"#{default_yun_session}"] current_domain_session = session[:"#{default_yun_session}"]
if current_domain_session autologin_user = try_to_autologin
# existing session uid_logger("user setup start: autologin_user is #{autologin_user}")
User.current = (User.active.find(current_domain_session) rescue nil) # 多浏览器退出账号时token不存在处理
elsif autologin_user = try_to_autologin if current_domain_session && autologin_user.nil?
autologin_user autologin_user = (User.active.find(current_domain_session) rescue nil)
elsif params[:format] == 'atom' && params[:key] && request.get? && accept_rss_auth? set_autologin_cookie(autologin_user) if autologin_user.present?
# RSS key authentication does not start a session
User.find_by_rss_key(params[:key])
end end
autologin_user
end end
def try_to_autologin def try_to_autologin
@ -410,24 +421,6 @@ class ApplicationController < ActionController::Base
"#{edu_setting('git_address_domain')}/#{repo_path}" "#{edu_setting('git_address_domain')}/#{repo_path}"
end end
# 通关后,把最后一次成功的代码存到数据库
# type 0 创始内容, 1 最新内容
# def game_passed_code(path, myshixun, game_id)
# # 如果代码窗口是隐藏的,则不用保存代码
# return if myshixun.shixun.hide_code || myshixun.shixun.vnc
# file_content = git_fle_content myshixun.repo_path, path
# #unless file_content.present?
# # raise("获取文件代码异常")
# #end
# logger.info("#######game_id:#{game_id}, file_content:#{file_content}")
# game_code = GameCode.where(:game_id => game_id, :path => path).first
# if game_code.nil?
# GameCode.create!(:game_id => game_id, :new_code => file_content, :path => path)
# else
# game_code.update_attributes!(:new_code => file_content)
# end
# end
# Post请求 # Post请求
def uri_post(uri, params) def uri_post(uri, params)
begin begin
@ -519,112 +512,6 @@ class ApplicationController < ActionController::Base
end end
# 实训主类别列表,自带描述
def shixun_main_type
list = []
mirrors = MirrorRepository.select([:id, :type_name, :description, :name]).published_main_mirror
mirrors.try(:each) do |mirror|
list << {id: mirror.id, type_name: mirror.type_name, description: mirror.try(:description), mirror_name: mirror.name}
end
list
end
# 小类别列表
def shixun_small_type
list = []
mirrors = MirrorRepository.select([:id, :type_name, :description, :name]).published_small_mirror
mirrors.try(:each) do |mirror|
list << {id: mirror.id, type_name: mirror.type_name, description: mirror.description, mirror_name: mirror.name}
end
list
end
def container_limit(mirror_repositories)
container = []
mirror_repositories.each do |mr|
if mr.name.present?
container << {:image => mr.name, :cpuLimit => mr.cpu_limit, :memoryLimit => "#{mr.memory_limit}M", :type => mr.try(:main_type) == "1" ? "main" : "sub"}
end
end
container.to_json
end
# 实训中间层pod配置
def shixun_container_limit shixun
container = []
shixun.shixun_service_configs.each do |config|
mirror = config.mirror_repository
if mirror.name.present?
# 资源限制没有就传默认值。
cpu_limit = config.cpu_limit.presence || 1
cpu_request = config.lower_cpu_limit.presence || 0.1
memory_limit = config.memory_limit.presence || 1024
request_limit = config.request_limit.presence || 10
resource_limit = config.resource_limit.presence || 10000
container << {:image => mirror.name,
:cpuLimit => cpu_limit,
:cpuRequest => cpu_request,
:memoryLimit => "#{memory_limit}M",
:memoryRequest => "#{request_limit}M",
:resourceLimit => "#{resource_limit}K",
:type => mirror.try(:main_type) == "1" ? "main" : "sub"}
end
end
container.to_json
end
# 毕设任务列表的赛选
def course_work(task, **option)
logger.info("#############{option}")
course = task.course
work_list = task.graduation_works.includes(user: [:user_extension])
# 教师评阅搜索 0: 未评, 1 已评
if option[:teacher_comment]
graduation_work_ids = GraduationWorkScore.where(graduation_work_id: work_list.map(&:id)).pluck(:graduation_work_id)
if option[:teacher_comment].zero?
work_list = work_list.where.not(id: graduation_work_ids)
elsif option[:teacher_comment] == 1
work_list = work_list.where(id: graduation_work_ids).where.not(work_status: 0)
end
end
# 作品状态 0 未提交, 1 按时提交, 2 延迟提交
if option[:task_status]
work_list = work_list.where(work_status: option[:task_status])
end
# 分班情况
if option[:course_group]
group_user_ids = course.course_members.where(course_group_id: option[:course_group]).pluck(:user_id)
# 有分组只可能是老师身份查看列表
work_list = work_list.where(user_id: group_user_ids)
end
# 只看我的交叉评阅
if option[:cross_comment]
graduation_work_id = task.graduation_work_comment_assignations.where(:user_id => current_user.id)
.pluck(:graduation_work_id).uniq if task.graduation_work_comment_assignations
work_list = work_list.where(id: graduation_work_id)
end
# 输入姓名和学号搜索
# TODO user_extension 如果修改 请调整
if option[:search]
work_list = work_list.joins(user: :user_extension).where("concat(lastname, firstname) like ?
or student_id like ?", "%#{option[:search]}%", "%#{option[:search]}%")
end
# 排序
rorder = UserExtension.column_names.include?(option[:order]) ? option[:order] : "updated_at"
b_order = %w(desc asc).include?(option[:b_order]) ? option[:b_order] : "desc"
if rorder == "created_at" || rorder == "work_score"
work_list = work_list.order("graduation_works.#{rorder} #{b_order}")
elsif rorder == "student_id"
work_list = work_list.joins(user: :user_extension).order("user_extensions.#{rorder} #{b_order}")
end
work_list
end
def strip_html(text, len=0, endss="...") def strip_html(text, len=0, endss="...")
ss = "" ss = ""
if !text.nil? && text.length>0 if !text.nil? && text.length>0
@ -715,7 +602,7 @@ class ApplicationController < ActionController::Base
end end
def find_user_with_id def find_user_with_id
@user = User.find_by_id params[:user_id] @user = User.find_by(type: 'User', id: params[:user_id])
# render_not_found("未找到’#{params[:login]}’相关的用户") unless @user # render_not_found("未找到’#{params[:login]}’相关的用户") unless @user
render_error("未找到相关的用户") unless @user render_error("未找到相关的用户") unless @user
end end
@ -1165,15 +1052,46 @@ class ApplicationController < ActionController::Base
# 接口限流,请求量大有性能问题 # 接口限流,请求量大有性能问题
def request_limit def request_limit
record_count = Rails.cache.read("request/#{controller_name}/#{Time.now.strftime('%Y%m%d%H%M')}/#{request.remote_ip}") white_list_ip = ["106.75.110.152"]
unless white_list_ip.include?(request.remote_ip)
record_count = Rails.cache.read("request/#{controller_name}/#{Time.now.strftime('%Y%m%d%H')}/#{request.remote_ip}")
if record_count.present?
record_count = record_count + 1
else
record_count = 1
end
Rails.logger.info("请求太快,请稍后再试。#{controller_name}::#{request.remote_ip}") if record_count > 200
tip_exception("请求太快,请稍后再试。") if record_count > 200
Rails.cache.write("request/#{controller_name}/#{Time.now.strftime('%Y%m%d%H')}/#{request.remote_ip}", record_count, expires_in: 1.hour)
end
end
def check_batch_requests
check_key = "request.remote_ip:#{request.remote_ip}"
result = Rails.cache.read(check_key)
if result.present?
if result.to_i > 100
tip_exception(401, '暂时无法请求,请稍后再试')
else
Rails.cache.write(check_key, result.to_i + 1)
end
else
Rails.cache.write(check_key, 1, expires_in: 1.hour)
end
end
def request_raw_limit
record_count = Rails.cache.read("request/#{request.path}/#{Time.now.strftime('%Y%m%d%H')}}")
if record_count.present? if record_count.present?
record_count = record_count + 1 record_count = record_count + 1
else else
record_count = 1 record_count = 1
end end
tip_exception("请求太快,请稍后再试。") if record_count > 100 Rails.logger.info("请求太快,请稍后再试。#{request.path}") if record_count > 1000
tip_exception("请求太快,请稍后再试。") if record_count > 1000
Rails.cache.write("request/#{controller_name}/#{Time.now.strftime('%Y%m%d%H%M')}/#{request.remote_ip}", record_count, expires_in: 1.minute) Rails.cache.write("request/#{request.path}/#{Time.now.strftime('%Y%m%d%H')}}", record_count, expires_in: 1.hour)
end end
end end

View File

@ -30,24 +30,33 @@ class AttachmentsController < ApplicationController
def get_file def get_file
Rails.logger.info("request.host===#{request.host},request.referer===#{request.referer}")
tip_exception(403, "你没有权限访问") if request.host.present? && !request.referer.to_s.include?(request.host.to_s.gsub("www.",""))
normal_status(-1, "参数缺失") if params[:download_url].blank? normal_status(-1, "参数缺失") if params[:download_url].blank?
url = base_url.starts_with?("https:") ? params[:download_url].to_s.gsub("http:", "https:") : params[:download_url].to_s url = base_url.starts_with?("https:") ? params[:download_url].to_s.gsub("http:", "https:") : params[:download_url].to_s
md5_file = Digest::MD5.hexdigest(params[:download_url])
FileUtils.mkdir_p("#{Rails.root}#{EduSetting.get("attachment_folder")}gitea/") unless Dir.exists?("#{Rails.root}#{EduSetting.get("attachment_folder")}gitea/")
tmp_path = "#{Rails.root}#{EduSetting.get("attachment_folder")}gitea/#{Time.now.strftime('%Y%m%d')}-#{md5_file}"
if url.starts_with?(base_url) && !url.starts_with?("#{base_url}/repo") if url.starts_with?(base_url) && !url.starts_with?("#{base_url}/repo")
domain = GiteaService.gitea_config[:domain] domain = GiteaService.gitea_config[:domain]
api_url = GiteaService.gitea_config[:base_url] api_url = GiteaService.gitea_config[:base_url]
url = ("/repos"+url.split(base_url + "/api")[1]) url = ("/repos"+url.split(base_url + "/api")[1])
filepath, ref = url.split("/")[-1].split("?") filepath, ref = url.split("/")[-1].split("?")
url.gsub!(url.split("/")[-1], '') url.gsub!(url.split("/")[-1], '')
Rails.logger.info("url===#{url}") # Rails.logger.info("url===#{url}")
request_url = [domain, api_url, URI.encode(url), CGI.escape(filepath), "?ref=#{CGI.escape(ref.split('ref=')[1])}&access_token=#{User.where(admin: true).take&.gitea_token}"].join Rails.logger.info(filepath)
ref = ref.blank? ? "" : URI.escape(ref.split('ref=')[1])
request_url = [domain, api_url, URI.encode(url), URI.escape(filepath), "?ref=#{ref}&access_token=#{User.where(admin: true).take&.gitea_token}"].join
Rails.logger.info("request_url===#{request_url}") Rails.logger.info("request_url===#{request_url}")
response = Faraday.get(request_url) File.delete(tmp_path) if File.exist?(tmp_path) # 删除之前的文件
Util.download_file(request_url, tmp_path)
filename = filepath filename = filepath
else else
response = Faraday.get(URI.encode(url)) File.delete(tmp_path) if File.exist?(tmp_path) # 删除之前的文件
Util.download_file(URI.encode(url), tmp_path)
filename = params[:download_url].to_s.split("/").pop() filename = params[:download_url].to_s.split("/").pop()
end end
send_data(response.body.force_encoding("UTF-8"), filename: filename, type: "application/octet-stream", disposition: 'attachment') send_file(tmp_path, filename: filename, type: "application/octet-stream", disposition: 'attachment')
end end
def create def create
@ -93,6 +102,10 @@ class AttachmentsController < ApplicationController
@attachment.author_id = current_user.id @attachment.author_id = current_user.id
@attachment.disk_directory = month_folder @attachment.disk_directory = month_folder
@attachment.cloud_url = remote_path @attachment.cloud_url = remote_path
@attachment.uuid = SecureRandom.uuid
@attachment.description = params[:description]
@attachment.container_id = params[:container_id]
@attachment.container_type = params[:container_type]
@attachment.save! @attachment.save!
else else
logger.info "文件已存在id = #{@attachment.id}, filename = #{@attachment.filename}" logger.info "文件已存在id = #{@attachment.id}, filename = #{@attachment.filename}"
@ -122,7 +135,7 @@ class AttachmentsController < ApplicationController
# 附件为视频时,点击播放 # 附件为视频时,点击播放
def preview_attachment def preview_attachment
attachment = Attachment.find_by(id: params[:id]) attachment = Attachment.where_id_or_uuid(params[:id]).first
dir_path = "#{Rails.root}/public/preview" dir_path = "#{Rails.root}/public/preview"
Dir.mkdir(dir_path) unless Dir.exist?(dir_path) Dir.mkdir(dir_path) unless Dir.exist?(dir_path)
if params[:status] == "preview" if params[:status] == "preview"
@ -142,12 +155,14 @@ class AttachmentsController < ApplicationController
private private
def find_file def find_file
tip_exception(404, "您访问的页面不存在或已被删除") if params[:id].blank?
@file = @file =
if params[:type] == 'history' if params[:type] == 'history'
AttachmentHistory.find params[:id] AttachmentHistory.find params[:id]
else else
Attachment.find params[:id] Attachment.where_id_or_uuid(params[:id]).first
end end
tip_exception(404, "您访问的页面不存在或已被删除") if @file.blank?
end end
def delete_file(file_path) def delete_file(file_path)
@ -217,18 +232,22 @@ class AttachmentsController < ApplicationController
def attachment_candown def attachment_candown
unless current_user.admin? || current_user.business? unless current_user.admin? || current_user.business?
candown = true candown = true
if @file.container if @file.container && @file.uuid.nil?
if @file.container.is_a?(Issue) if @file.container.is_a?(Issue)
project = @file.container.project project = @file.container.project
candown = project.is_public || (current_user.logged? && project.member?(current_user)) candown = project.is_public || (current_user.logged? && project.member?(current_user))
elsif @file.container.is_a?(Journal) elsif @file.container.is_a?(Journal)
project = @file.container.issue.project project = @file.container.issue.project
candown = project.is_public || (current_user.logged? && project.member?(current_user)) candown = project.is_public || (current_user.logged? && project.member?(current_user))
elsif @file.container.is_a?(Project)
project = @file.container
candown = project.is_public || (current_user.logged? && project.member?(current_user))
else else
project = nil project = nil
end end
tip_exception(403, "您没有权限进入") if project.present? && !candown tip_exception(403, "您没有权限进入") if project.present? && !candown
end end
tip_exception(403, "您没有权限查看") if @file.is_public == 0 && @file.author_id != current_user.id
end end
end end

View File

@ -8,7 +8,7 @@ class BindUsersController < ApplicationController
bind_user = User.try_to_login(params[:username], params[:password]) bind_user = User.try_to_login(params[:username], params[:password])
tip_exception '用户名或者密码错误' if bind_user.blank? tip_exception '用户名或者密码错误' if bind_user.blank?
tip_exception '用户名或者密码错误' unless bind_user.check_password?(params[:password].to_s) tip_exception '用户名或者密码错误' unless bind_user.check_password?(params[:password].to_s)
tip_exception '参数错误' unless ["qq", "wechat", "gitee", "github", "educoder"].include?(params[:type].to_s) tip_exception '参数错误' unless ["qq", "wechat", "gitee", "github", "educoder", "acge"].include?(params[:type].to_s)
tip_exception '该账号已被绑定,请更换其他账号进行绑定' if bind_user.bind_open_user?(params[:type].to_s) tip_exception '该账号已被绑定,请更换其他账号进行绑定' if bind_user.bind_open_user?(params[:type].to_s)
"OpenUsers::#{params[:type].to_s.capitalize}".constantize.create!(user: bind_user, uid: session[:unionid]) "OpenUsers::#{params[:type].to_s.capitalize}".constantize.create!(user: bind_user, uid: session[:unionid])

View File

@ -19,12 +19,23 @@ class CommitLogsController < ApplicationController
params[:commits].each do |commit| params[:commits].each do |commit|
commit_id = commit[:id] commit_id = commit[:id]
message = commit[:message] message = commit[:message]
commit_date = Time.parse(commit[:timestamp]) || Time.now
commit_log = CommitLog.create(user: user, project: project, repository_id: repository_id, commit_log = CommitLog.create(user: user, project: project, repository_id: repository_id,
name: repository_name, full_name: repository_full_name, name: repository_name, full_name: repository_full_name,
ref: ref, commit_id: commit_id, message: message) ref: ref, commit_id: commit_id, message: message, created_at: commit_date, updated_at: commit_date)
commit_log.project_trends.create(user_id: user.id, project_id: project&.id, action_type: "create") if user.id !=2 commit_log.project_trends.create(user_id: user.id, project_id: project&.id, action_type: "create") if user.id !=2
# 统计数据新增 # 统计数据新增
CacheAsyncSetJob.perform_later("project_common_service", {commits: 1}, project.id) CacheAsyncSetJob.perform_later("project_common_service", {commits: 1}, project.id)
commit_user = User.find_by(mail: commit[:committer][:email]) rescue nil
commit_user = User.find_by(login: commit[:committer][:name]) if commit_user.blank? rescue nil
next if commit_user.blank?
# 触发变更issue状态的job
close_issue_content = message.to_s.scan(/\b(Close|Closes|Closed|Closing|close|closes|closed|closing)\s*(#\d+(,\s*#\d+)*)?\b/)
ChangeIssueStatusByMessageJob.perform_later(commit_id, project, commit_user, close_issue_content[0][1], 5) if close_issue_content[0].present? && close_issue_content[0][1].present?
solve_issue_content = message.to_s.scan(/\b(Fix|Fixes|Fixed|Fixing|fix|fixes|fixed|fixing|Resolve|Resolves|Resolved|Resolving|resolve|resolves|resolved|resolving|Implement|Implements|Implemented|Implementing|implement|implements|implemented|implementing)\s*(#\d+(,\s*#\d+)*)?\b/)
ChangeIssueStatusByMessageJob.perform_later(commit_id, project, commit_user, solve_issue_content[0][1], 3) if solve_issue_content[0].present? && solve_issue_content[0][1].present?
end end
end end

View File

@ -18,6 +18,7 @@ class CompareController < ApplicationController
@page_limit = page_limit <=0 ? 15 : page_limit @page_limit = page_limit <=0 ? 15 : page_limit
@page_offset = (@page_size -1) * @page_limit @page_offset = (@page_size -1) * @page_limit
Rails.logger.info("+========#{@page_size}-#{@page_limit}-#{@page_offset}") Rails.logger.info("+========#{@page_size}-#{@page_limit}-#{@page_offset}")
Rails.logger.info @compare_result
end end
private private
@ -36,7 +37,7 @@ class CompareController < ApplicationController
if @exist_pullrequest.present? if @exist_pullrequest.present?
return -2, "在这些分支之间的合并请求已存在:<a href='/#{@owner.login}/#{@project.identifier}/pulls/#{@exist_pullrequest.id}'>#{@exist_pullrequest.try(:title)}</a>" return -2, "在这些分支之间的合并请求已存在:<a href='/#{@owner.login}/#{@project.identifier}/pulls/#{@exist_pullrequest.id}'>#{@exist_pullrequest.try(:title)}</a>"
else else
if @compare_result["Commits"].blank? && @compare_result["Diff"].blank? if @compare_result["FilesCount"].to_i == 0 && @compare_result["CommitsCount"].to_i == 0
return -2, "分支内容相同,无需创建合并请求" return -2, "分支内容相同,无需创建合并请求"
end end
end end

Some files were not shown because too many files have changed in this diff Show More