Open
openLiBing代码仓全面接入代码度量扫描插件 #14
YanZhaohongAdd on  Sep 24
YanZhaohong
YanZhaohongCollaborators
Sep 24 Create

背景

openLiBing 平台已在 openlibing-cicd 等仓验证代码度量扫描工作流(code-metrics-scan),现计划将该工作流全面推广到 openlibing 组织各代码仓,实现代码度量指标(圈复杂度、重复率等)统一采集与平台化展示。

变更内容

在各代码仓新增(或统一调整).gitcode/workflows/code-metrics-scan.yml 工作流:

  • name 统一为 code-metrics-scan
  • 触发方式:workflow_dispatch + push 默认分支(去掉 schedule)
  • runs-on: ["self-hosted", "region=cn"]
  • checkout 步骤:单仓扫描不携带 token,统一使用平台注入凭据(不再要求私有仓配置 ROBOT_TOKEN)
  • 插件版本:openlibing/code-metrics-action@6723b5fca2a631a680386c860cb3dbc67e502849

验收标准

  • 各仓 PR 合入后,工作流可在 push 默认分支或手动触发时正常执行
  • 扫描结果可在 openLiBing 平台“代码度量”页面正常查看

最新进展(2026-11-05)

  • 已完成 openlibing 组织 36 个仓库排查,其中 35 个活跃仓已提交 PR;openlibing-tools 已归档,未提交。
  • 5 个重复 PR 已关闭并指向对应正式 PR:
    • openlibing-sbom#175 → openlibing-sbom#174
    • openlibing-cicd-web#202 → openlibing-cicd-web#201
    • openlibing-sbom-tools#33 → openlibing-sbom-tools#32
    • openlibing-cicd#652 → openlibing-cicd#651
    • openlibing-ide-plugin#47 → openlibing-ide-plugin#46
  • 本批剩余 30 个 PR 待合入。其中 openlibing-design-api-management#292 已具备完整评审条件:流水线通过(ci-pipeline-passed)、测试人 Yubing0_0 已评论 /lgtm、评审人 ozvale 已设置、mergeable=true。
  • 其余 PR 待流水线通过或测试人评审后继续推进。

本 issue 作为代码度量扫描工作流接入及 checkout token 清理的关联 issue,各仓 PR 均引用本 issue。

likedislike
chenningchenningCollaborators
Sep 28 Associated pull request
chenningchenningCollaborators
Sep 28 Associated pull request
chenningchenningCollaborators
Sep 28 Associated pull request
chenningchenningCollaborators
Sep 28 Associated pull request
chenningchenningCollaborators
Sep 28 Associated pull request
164 messages are collapsed here。 See more
YanZhaohongYanZhaohongCollaborators
4 days ago Associated pull request
YanZhaohongYanZhaohongCollaborators
4 days ago Associated pull request
YanZhaohongYanZhaohongCollaborators
2 days ago Modify description of issue
YanZhaohongYanZhaohongCollaborators
1 day ago Associated pull request
YanZhaohongYanZhaohongCollaborators
1 day ago Associated pull request