Skip to content

fix(ci): preserve merge commits when syncing main into dev - #484

Merged
github-actions[bot] merged 1 commit into
devfrom
cursor/fix-dev-automerged-policy-59b8
Aug 22, 2026
Merged

fix(ci): preserve merge commits when syncing main into dev#484
github-actions[bot] merged 1 commit into
devfrom
cursor/fix-dev-automerged-policy-59b8

Conversation

@ZUENS2020

Copy link
Copy Markdown
Owner

变更摘要

修复 dev 上 auto-merge 无条件 squash 导致的拓扑问题,并在 GITHUB_TOKEN 合并后补触发 Deploy Dev。

  • auto-merge-dev.yml:标题以 Merge main into / Merge origin/main 开头的 PR 使用 --merge,其余仍 --squash
  • 合入 devworkflow_dispatch Deploy Dev(GITHUB_TOKEN push 不会触发 on: push,而 devmain 需要一次成功的 dev 环境部署)
  • 删除 record-dev-deployment.yml:那是给错误 stack 的权宜之计,会把真实集群部署标成 inactive

#483 已被 squash 合入,origin/main 仍不是 dev 的祖先。本 PR 落地后会再开一条 Merge main into dev PR,用 merge commit 补回拓扑。

风险与回滚点

  • Deploy Dev 会 reset sherpa-dev namespace(现有行为)。若 self-hosted runner 不在线,dispatch 会排队或失败,提升 PR 仍可能显示 Missing successful active dev deployment。
  • 回滚:revert 本 squash commit,恢复旧的 --squash only。

验证结果

  • python3 -c 'import yaml; yaml.safe_load(...)' 通过
  • 本 PR 预期被 auto-merge squash(标题不以 Merge main into 开头)
Open in Web Open in Cursor 

Auto-merge was unconditionally --squash, which dropped origin/main as
an ancestor and made the next dev → main PR conflict on AGENTS.md.
Use --merge when the title starts with "Merge main into". Also dispatch
Deploy Dev after a GITHUB_TOKEN merge, because those pushes do not
trigger on.push, and promotion to main requires an active dev deploy.
Remove the transient PR deployment recorder; it was masking the stack
mis-wiring rather than replacing cluster deploy.

Co-authored-by: ZUENS2020 <ZUENS2020@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 22, 2026 02:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions
github-actions Bot merged commit 36a36d2 into dev Aug 22, 2026
5 checks passed
@github-actions

Copy link
Copy Markdown

PR Summary

  • total changed files: 2
  • docs/assets changed files: 0
  • backend related files: 0
  • frontend related files: 0
  • docs/assets only: false

Changed Files (top 200)

  • .github/workflows/auto-merge-dev.yml
  • .github/workflows/record-dev-deployment.yml

@cursor
cursor Bot deleted the cursor/fix-dev-automerged-policy-59b8 branch August 22, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants