Skip to content

fix(ci): run CI when pull requests retarget main - #4186

Open
jackeyfaker77 wants to merge 1 commit into
apache:mainfrom
jackeyfaker77:ci/pr-retarget-main
Open

fix(ci): run CI when pull requests retarget main#4186
jackeyfaker77 wants to merge 1 commit into
apache:mainfrom
jackeyfaker77:ci/pr-retarget-main

Conversation

@jackeyfaker77

Copy link
Copy Markdown
Contributor

Summary

  • Trigger CI when a pull request is retargeted to main.
  • Ensure title/body-only edits do not cancel or replace the required CI check.
  • Add regression coverage for the workflow policy.

Fixes #4181

Verification

  • node --test --test-concurrency=1 scripts/ci-test-plan.test.mjs
  • npx biome check scripts/ci-test-plan.test.mjs
  • git diff --check

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — CI now runs when a pull request is retargeted to main
  • No

@jackeyfaker77

Copy link
Copy Markdown
Contributor Author

CI has now failed three times in the WorkHub Desktop E2E area:

The first two runs completed with 87 tests passing, 1 skipped, and 3 failing. The latest run completed with 88 passing, 1 skipped, and 2 failing.

The two workhub-reconstruction.spec.ts tests failed in all three runs, while the exact missing or detached WorkHub elements vary between runs. The previously failing WorkHub layout test passed in the latest run.

This PR only changes .github/workflows/ci.yml and scripts/ci-test-plan.test.mjs. All checks before Desktop E2E, including lint, formatting, build, typecheck, workspace tests, and Runtime Host tests, passed.

Could a maintainer confirm whether these are current baseline or flaky E2E failures?

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the focused fix and for tracing the retarget gap back to a concrete PR timeline.

I reviewed exact head ac52efb00af15e1e52b569e02982ae143f3203bc and found no P0–P3 issues.

The problem is demonstrated: a pull request whose head was updated while targeting another branch could be retargeted to main without producing the required CI / test check. The implementation extends the existing CI workflow to the edited event, keeps base retargets on the established test authority, and isolates title/body-only edits under a uniquely named skipped job so they neither cancel nor satisfy the required check. It introduces no second workflow, required-check authority, or additional permission.

Approved.

The exact-head test check is currently red only in two WorkHub reconstruction E2E cases after all earlier workflow steps passed. Those failures appear unrelated to this two-file CI policy change, but repository policy still requires a green exact-head test before merge.

Review analysis was assisted by Codex and an independent @reviewer agent. Astro-Han verified the exact head, GitHub Actions event and concurrency semantics, the focused regression contract, CI evidence, and severity judgment, and owns this review.

中文对照

谢谢你提交这个边界清晰的修复,并通过真实 PR 时间线定位 retarget 缺口。

我审查了精确 head ac52efb00af15e1e52b569e02982ae143f3203bc,没有发现 P0–P3 问题。

问题已经得到实际证明:PR 的 head 在目标还是其他分支时发生更新,随后把 base 改为 main,不会产生 required CI / test。当前实现继续使用既有 CI workflow 和 test authority,通过 edited 覆盖 base retarget;title/body 编辑则进入唯一命名的 skipped job,不会取消或冒充 required check。没有新增第二套 workflow、required-check authority 或额外权限。

Approve。

当前 exact-head test 仅在两条 WorkHub reconstruction E2E 上失败,之前的 workflow 步骤均已通过,看起来与这个两文件的 CI policy 修复无关。但按照仓库规则,合并前仍必须恢复绿色的 exact-head test

本次审查分析由 Codex 和独立的 @reviewer 子代理协助;Astro-Han 核验了精确 head、GitHub Actions 事件与并发语义、聚焦回归契约、CI 证据和问题分级,并对本次 Review 负责。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI does not run when a pull request is retargeted to main

2 participants