知识卡片
PR构建校验契约差异
在 PR 的契约检查作业中,先检出对应的主线基线与提案版本到不同目录。用 Spectral 检查提案定义是否遵循团队规则;用 oasdiff 比较基线与提案,配置为遇到破坏性差异即失败。例中移除已存在的路径会令后一步报错,评审界面应能指向具体原因。
门禁结果的判定逻辑由[[自动识别破坏性变更]]说明。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- API 制品的源代码阶段治理 8.5 Setting up the MDRC · 查看原书依据
For the third MDRC criteria—the PR must pass all breaking change checks—create another step in the pr-api-minimum-review-criteria job to check for breaking changes. This step should use the oasdiff/oasdiff-action/check-breaking@main action (documented on https://github.com/oasdiff/oasdiff-action) to do the check.
参考来源
- 位置:《Automating API Delivery APIOps with OpenAPI》《第 08 章 API 制品的源代码阶段治理》(8.5 Setting up the MDRC;来源项目 book-source,extracted/Automating API Delivery APIOps with OpenAPI/_epub-src/OEBPS/Text/chapter-8.xhtml#p109)
- 结论依据:原文要求比较基线与提案定义,并用差异检查作业输出阻断信号。
- 原始内容:For the third MDRC criteria—the PR must pass all breaking change checks—create another step in the pr-api-minimum-review-criteria job to check for breaking changes. This step should use the oasdiff/oasdiff-action/check-breaking@main action (documented on https://github.com/oasdiff/oasdiff-action) to do the check.