用Claude Code审查制作公司的Azure DevOps Pipeline发布审批
把PR、ManualValidation、production approval和rollback证据拆成发布流程。
在网站制作公司,PR、staging URL、客户审批记录和 Azure Pipelines run 页面常常分散在不同标签页。一个小文案修改,也可能因为大家都以为别人看过而进入 production。本文把 branch policies、ManualValidation 和 approvals 变成发布表。
制作公司发布失败的地方
- 分开PR审批、staging确认、客户审批和production审批。
- merge前用branch policies保护main或release branch。
- 需要看staging URL和rollback时,用ManualValidation暂停。
- production前用environment approvals作为门。
- Claude Code整理YAML和diff;客户、价格、法律文案、时间、rollback由人确认。
The source base is Microsoft Learn for pipeline deployment approvals, ManualValidation@1, release approvals, branch policies, and the tasks reference. For an internal release-flow pattern, see the agency cloud release article.
Claude Code准备什么,人审批什么
在网站制作公司,PR、staging URL、客户审批记录和 Azure Pipelines run 页面常常分散在不同标签页。一个小文案修改,也可能因为大家都以为别人看过而进入 production。本文把 branch policies、ManualValidation 和 approvals 变成发布表。 Claude Code should read pipeline YAML, PR template, diff summary, staging checklist, branch policy notes, and environment approval notes. It should output a release table that names branch, build, staging deploy, manual validation, production environment, approver, timeout, rollback note, and evidence link.
Humans keep client acceptance, ad claims, pricing, legal copy, publish timing, emergency exceptions, and rollback decision. This distinction keeps the agent from acting like the release owner. The agent prepares evidence; the agency decides.
三个Use case
Use case 1
输入: PR URL、diff、build结果、reviewer、branch policy、目标页面。输出: PR、production、client三列表。人工确认: 价格、法律文案、广告、客户OK、发布时间、rollback。
Use case 2
输入: staging URL、reviewer email、截图、diff、rollback note、deadline。输出: ManualValidation@1 instructions和checklist。人工确认: 手机显示、表单、图片、链接、analytics、client OK。
Use case 3
输入: production environment、approvers、branch control、business hours、exclusive lock、channel。输出: 顺序、owner、timeout、失败联系人。人工确认: 不自审、夜间发布、广告开始、rollback owner。
可复制的提示词
You are auditing an Azure DevOps release flow for a web agency.
Inputs: azure-pipelines.yml, PR template, branch policy memo, production environment approvals memo, staging URL checklist, and a recent rollback or rework note.
Output:
1. Three-column table: PR review, staging/client review, production approval.
2. ManualValidation@1 instruction text with staging URL, diff, rollback note, owner, and deadline.
3. Production environment approvals and checks proposal.
4. Branch policy list: reviewer, build validation, comment resolution, status check.
5. One first action that can be done in 30 minutes.
Rules: do not let the agent approve client acceptance, pricing, legal wording, publish timing, or production release.
检查代码
const pipelineText = [
"trigger:",
" branches:",
" include:",
" - main",
"stages:",
" - stage: Build",
" jobs:",
" - job: build",
" steps:",
" - script: npm ci && npm run build",
" - stage: DeployStaging",
" jobs:",
" - job: deploy_staging",
" steps:",
" - script: echo deploy staging",
" - stage: ClientCheck",
" jobs:",
" - job: wait_for_client",
" pool: server",
" steps:",
" - task: ManualValidation@1",
" inputs:",
" notifyUsers: [email protected]",
" instructions: Check staging URL, PR diff, rollback note, and client approval.",
" - stage: DeployProduction",
" jobs:",
" - deployment: production",
" environment: production",
" strategy:",
" runOnce:",
" deploy:",
" steps:",
" - script: echo deploy production"
].join(String.fromCharCode(10));
const required = [
{ name: "main branch trigger", pattern: /- main/ },
{ name: "staging stage", pattern: /DeployStaging/ },
{ name: "manual validation", pattern: /ManualValidation@1/ },
{ name: "server pool for manual validation", pattern: /pool:\s*server/ },
{ name: "production environment", pattern: /environment:\s*production/ },
{ name: "rollback note in approval text", pattern: /rollback/i }
];
const findings = [];
for (const rule of required) {
if (!rule.pattern.test(pipelineText)) {
findings.push({ item: rule.name, fix: "add this gate before production release" });
}
}
const productionIndex = pipelineText.indexOf("DeployProduction");
const validationIndex = pipelineText.indexOf("ManualValidation@1");
if (productionIndex !== -1 && validationIndex !== -1 && validationIndex > productionIndex) {
findings.push({
item: "approval order",
fix: "place client/manual validation before production deployment"
});
}
console.table(findings);
if (findings.length > 0) process.exitCode = 1;
Pitfall: 常见错误
The first cause is treating PR approval as production approval. The fix is to separate code review, staging review, client acceptance, and production approval by name and owner.
The second cause is relying on notification recipients as if they were approvers. The fix is to inspect environment approval and project permissions separately from notifyUsers.
The third cause is approving without a rollback note. The fix is to add rollback commit, previous artifact, owner, and contact path to the approval text.
The fourth cause is bypassing branch policy under pressure. The fix is to define an emergency exception path with time limit, approver, evidence, and follow-up review.
常见问题
Q. Should we use ManualValidation or environment approval? A. Use ManualValidation for an in-stage pause such as staging URL review. Use environment approvals and checks as the production gate.
Q. Should client approval live inside Azure DevOps? A. If the client does not use Azure DevOps, store the approval URL or message link in the release memo and tie it to the pipeline run.
Q. Does a small content change need branch policy? A. Yes. Pricing pages, hiring pages, and ad landing pages can affect leads and revenue even when the code diff is small.
Q. Can Claude Code approve the release? A. No. It can summarize diff, list missing evidence, and draft checklists. Humans approve production.
咨询路径
制作公司的价值不在更长的YAML,而在少发错、留下客户证据。带上最近PR、YAML、staging checklist和rollback memo,到咨询页整理即可。 Use Claude Code training and consultation if the team needs help turning PRs, pipeline YAML, staging checks, and rollback memos into a repeatable release workflow.
我验证了什么
我查看了 Microsoft Learn 中 approvals、ManualValidation@1、release approvals、branch policies 和 task reference。也本地运行代码,确认会检查 ManualValidation、server pool、production environment 和 rollback note。第一步是把PR、staging、production分成三列。
相关文章
Claude Code CI/CD 设置:用 GitHub Actions 安全自动化
用 Claude Code 和 GitHub Actions 安全搭建 CI/CD:测试门禁、Secrets、部署审批与回滚。
用 Claude Code 进阶 GitHub Actions:权限、OIDC、cache 与 matrix CI
用 Claude Code 设计更安全的 GitHub Actions,涵盖权限、OIDC、cache、matrix 和可运行 YAML。
制作公司如何用 Codex Desktop 审查 diff、跟进 PR 与发布验收
面向网站制作公司的实务流程:用 Codex 审查 diff、处理 PR、核对 staging URL,并把客户确认与正式发布保留给人工审批。
免费 PDF: Claude Code 速查表
输入邮箱即可获取一页 PDF,整理常用命令、审查习惯和安全工作流。
我们会妥善保护你的信息,不发送垃圾邮件。
让 Claude Code 真正进入可验证的工作流
先用免费 PDF 固定基础,再用 Gumroad 教材复用工作流;如果涉及团队导入、权限或收入路径,可以直接咨询。
关于作者
Masa
专注 Claude Code 实务流程、团队导入和内容转化的工程师。