Merge pull request #2772 from pikasTech/fix/2772-pac-env-requested-scope

fix(cicd): 将环境变化纳入发布请求范围
This commit is contained in:
Lyon
2026-07-21 19:40:36 +08:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
@@ -321,6 +321,8 @@ test("L2/L3 release exposes plan first and trigger only sends the PaC webhook",
expect(planAction).toContain("imageBuildCount");
expect(planAction).toContain("envReuse");
expect(planAction).toContain("requestedScope");
expect(planAction).toContain("service.envChangedPaths");
expect(planAction).toContain("service.codeChangedPaths");
expect(planAction).toContain("expandedServices");
expect(planAction).toContain("buildServices");
expect(planAction).toContain("rolloutServices");
@@ -288,7 +288,10 @@ const rolloutServices = domain?.rolloutServices || affectedServices;
const buildServices = domain?.buildServices || (changedPaths.length > 0 ? configuredImages : []);
const requestedServices = domain
? (domain.services || [])
.filter((service) => (service.changedPaths || []).length > 0 || service.runtimeConfigChanged === true)
.filter((service) => (service.changedPaths || []).length > 0
|| (service.envChangedPaths || []).length > 0
|| (service.codeChangedPaths || []).length > 0
|| service.runtimeConfigChanged === true)
.map((service) => service.serviceId)
: (changedPaths.length > 0 ? [process.env.UNIDESK_PAC_MANUAL_RUNTIME_SERVICE].filter(Boolean) : []);
const expandedServices = affectedServices.filter((serviceId) => !requestedServices.includes(serviceId));