Skip to content

ci: add manual Bug Server PR screenshot workflow - #5338

Merged
Rui-Sun merged 4 commits into
developfrom
codex/manual-pr-photo
Oct 10, 2026
Merged

Rui-Sun merged 4 commits into
developfrom
codex/manual-pr-photo

Conversation

@Rui-Sun

@Rui-Sun Rui-Sun commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🤔 这个分支是...

  • Workflow

🔗 相关 issue 连接

BOE 联调对象:VTable #5320。本 PR 接入测试入口,不修改或合并该 PR 的业务代码。

💡 问题的背景&解决方案

外部 fork PR 无法获得项目 BUG_SERVER_TOKEN,因此无法沿用现有 CI 的 Bug Server 提交步骤。新增 Bug Server Manual PR workflow,让 bugserver 页面创建冻结 head SHA 的截图任务后,从默认分支 develop 调用可信控制脚本。

  • prepare 读取服务端冻结的任务,尝试复用有效 artifact。
  • build-bundle 在 GitHub 托管 runner 的独立 Docker 容器中构建冻结的 PR head;只挂载源码,不传 runner/cache 凭据或 Docker socket,容器退出后严格校验普通文件、实际路径和大小,再上传 artifact。
  • submit 固定 checkout workflow 控制提交;严格提取 ZIP 中唯一的普通 index.js,将 JS 当作数据上传,复用已有 SCM 和截图链路。
  • 独立 workflow_run reporter 回报取消、超时和失败;最终结果及负责人通知由 bugserver 服务端处理。

输入仅接受服务端任务 UUID task_id 和 environment(cn / boe,默认 cn)。BOE 使用固定回报地址及 :boe run-name 后缀,正式任务保留既有公网 CI 入口。沿用仓库已有 BUG_SERVER_TOKEN;GitHub App 私钥只保存在 bugserver 服务端。

本次新增 2 个 workflow、控制脚本及测试、严格提取器及测试,共 6 个文件;现有 Bug Server CI 保留。新增入口只运行截图测试。

📝 Changelog

Language Changelog
🇺🇸 English Add trusted manual PR screenshot workflows with frozen-head builds, artifact reuse, and CN/BOE reporting.
🇨🇳 Chinese 接入冻结 PR head 的手动截图测试,支持产物复用及 CN/BOE 结果回报。

☑️ 自测

  • 文档提供了,或者更新,或者不需要(调用方式及环境要求见本 PR 描述)
  • Demo 提供了,或者更新,或者不需要
  • Ts 类型定义提供了,或者更新,或者不需要
  • Changelog 提供了,或者不需要

验证结果:

  • node --test .github/scripts/bug-server-manual.test.cjs:6/6 通过。
  • python3 -B -m unittest discover -s .github/scripts -p 'test_extract_bug_server_bundle.py':6/6 通过。
  • workflow YAML 解析、CN/BOE 输入、可信 checkout、构建 job 无 secret、Docker 隔离参数、可信镜像准备顺序、Bash 语法及 reporter 事件配置检查通过;git diff --check 通过。
  • GitHub 最新提交的 CodeQL Actions、JavaScript/TypeScript、Python 分析及 CodeQL 汇总均通过。
  • 按 AGENTS.md 使用 Node.js 22 尝试全量本地视觉回归(204 个用例);临时检出缺少 Rush 依赖,预检返回 Cannot find module 'typescript',未执行截图,不计为通过。

部署及联调条件:bugserver BOE 服务需部署对应 API、配置 App 私钥与项目 token、开放 VTable 产品,并确认 GitHub 托管 runner 可访问固定 BOE CI 地址。合入 develop 后再用 #5320 验证真实构建、SCM、截图及通知;这些步骤尚未实测;本机无 Docker,尚未执行真实容器构建。

接入提交包含 [skip ci],避免准备阶段自动启动既有正式 Bug Server CI;本 PR 保持 Draft,待审阅和部署条件就绪后合并。


🚀 Summary

copilot:summary

🔍 Walkthrough

copilot:walkthrough

@github-actions github-actions Bot added the chore label Oct 10, 2026
Comment thread .github/workflows/bug-server-manual.yml Fixed
Comment thread .github/workflows/bug-server-manual.yml Fixed
Comment thread .github/scripts/bug-server-manual.cjs Fixed
Comment thread .github/scripts/bug-server-manual.test.cjs Fixed
Comment thread .github/scripts/bug-server-manual.test.cjs Fixed
Comment thread .github/scripts/bug-server-manual.test.cjs Fixed
Comment thread .github/workflows/bug-server-manual.yml Fixed
Comment thread .github/workflows/bug-server-manual.yml Fixed
@Rui-Sun
Rui-Sun marked this pull request as ready for review October 10, 2026 04:31
@Rui-Sun
Rui-Sun merged commit de55ec5 into develop Oct 10, 2026
6 checks passed
@Rui-Sun
Rui-Sun deleted the codex/manual-pr-photo branch October 10, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants