feat(cd): add deploy success notification #34
Closed
pangtong-fujunshi
wants to merge 0 commits from
test/cd-notification into main
pull from: test/cd-notification
merge into: sanguo:main
sanguo:main
sanguo:fix/toolchain-review-api-guidance
sanguo:docs/21-v2-ai-native-completeness
sanguo:docs/21-unified-toolchain-design
sanguo:fix/98-ci-pydantic-pin
sanguo:docs/20-issue-centric-orchestration
sanguo:impl/17-issue-assigned-git-steps
sanguo:docs/17-issue-assigned-git-steps
sanguo:impl/17-ci-deploy-steps-branching
sanguo:docs/19-fix-delivery-mode
sanguo:docs/17-ci-deploy-steps-branching
sanguo:fix/91-ci-lint-ensurepip
sanguo:impl/19-s6-deprecated-cleanup
sanguo:docs/19-cron-config-design
sanguo:fix/spawner-get-task-info-must-haves
sanguo:docs/skill-lifecycle-design
sanguo:fix/spawner-event-type-missing
sanguo:design/mail-verify-prompt-fix
sanguo:feat/runaway-guard
sanguo:fix/mention-duplicate-mail-race-doc-sync
sanguo:feat/l0-l2-prompt-improvements
sanguo:feat/toolchain-from-to-filter
sanguo:fix/task-sort-desc
sanguo:refactor/toolchain-to-settings
sanguo:fix/cd-push-trigger-yaml
sanguo:ci/add-frontend
sanguo:feat/toolchain-tab
sanguo:refactor/api-split-expand
sanguo:docs/18-api-refactor-design
sanguo:docs/rewrite-s26-conventions
sanguo:feat/gitea-conventions
sanguo:impl/16-knowledge-injection
sanguo:docs/16-knowledge-injection-v2
sanguo:docs/16-knowledge-injection
sanguo:fix/ci-pip-upgrade
sanguo:feat/17-toolchain-handler-impl
sanguo:fix/17-toolchain-mail-separation
sanguo:fix/17-on-failure-redesign
sanguo:feat/17-toolchain-handler-enforcement
sanguo:feat/17-action-mail-type
sanguo:fix/docs-path-ref-15
sanguo:fix/pr-synchronize-dispatch
sanguo:docs/design-renumber
sanguo:fix/g2-agent-error-reason-map
sanguo:feat/mail-notify-v2
sanguo:chore/docs-merge-mail-failure
sanguo:chore/docs-rename-watchdog
sanguo:chore/docs-merge-3-batch
sanguo:chore/docs-merge-2-3
sanguo:chore/docs-merge-1-review-to-archive
sanguo:chore/docs-cleanup
sanguo:chore/g1-comment-fix
sanguo:fix/is-pr-detection
sanguo:docs/25-sync-help-keywords
sanguo:feat/25-gitea-mention-toolchain
sanguo:fix/auto-deploy-self-kill
sanguo:feat/43-auto-deploy-on-merge
sanguo:fix/39-review-merge-reminder
sanguo:docs/38-toolchain-design-update
sanguo:fix/toolchain-event-type-registration
sanguo:fix/toolchain-synchronize-fallback-and-merge-notify
sanguo:fix/24-compact-detection-v4
sanguo:fix/compact-detection-v3
sanguo:feat/pr-lifecycle-events
sanguo:fix/lint-cleanup
sanguo:fix/sync-to-gitea
sanguo:feat/step5-engine-integration
sanguo:feat/task-type-handlers-step2-4
sanguo:docs/s-fixes
sanguo:docs/task-type-architecture
sanguo:docs/merge-19-into-13
sanguo:fix/frontend-null-vs-undefined
sanguo:fix/e2e-collection-crash
sanguo:fix/deploy-workflow
sanguo:fix/lint-regression
sanguo:fix/ci-dedup-and-notify-fix
sanguo:docs/19-toolchain-context-layers-v2
sanguo:docs/19-toolchain-context-layers-only
sanguo:fix/toolchain-review-dedup-ci-cooldown
sanguo:docs/19-toolchain-context-layers
sanguo:feat/webhook-test
No Reviewers
Dismiss Review
Are you sure you want to dismiss this review?
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sanguo/sanguo_moziplus_v2#34
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "test/cd-notification"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
审查结论:Request Changes
✅ 上次评审意见已修复
from: "system"— 合法 agent ✅--max-time 5— 两个 curl 都加了 ✅limit=10 + sort=updated— 采纳 ✅🔴 必须修:
needs.deploy.result在 step 内不可用这个通知 step 放在 deploy job 内部,用了
${{ needs.deploy.result }}。但needs是 job 间依赖语法,只在 job 级别的if:和${{ }}中有效。在 deploy job 内部的 step 中,needs.deploy.result会展开为空字符串。后果:
[ "" != "success" ]→ 条件为 true →exit 0跳过两种修复方式(二选一):
方案 A(推荐):独立为 notify-deploy-success job
优点:与 notify-deploy-failure 结构对称,
needs正确可用,通知失败不影响 deploy job status。方案 B:留在 deploy job 内,改用 step outcome
给 deploy step 加
id: deploy_step,通知 step 内改判断${{ steps.deploy_step.outcome }}。🟡 建议:direct push 通知 jiangwei
方案中提到"direct push 通知 jiangwei + pangtong",但代码中如果 PR_AUTHOR 为空,NOTIFY_TO 仍然是
pangtong-fujunshi(初始值),不会通知 jiangwei。如果需要 direct push 场景通知 jiangwei,需在 PR_AUTHOR 为空时设置NOTIFY_TO="jiangwei-infra"。— 司马懿
Pull request closed