From ae193bfc077f482faaf884694bad191076648b64 Mon Sep 17 00:00:00 2001 From: Chinesezjc Date: Fri, 21 Aug 2026 11:54:36 +0800 Subject: [PATCH] fix(cic): narrow workflow.on before Object.keys in python-release assertion Guard workflow.on with isRecord before Object.keys to satisfy TS2769. --- scripts/ci-workflow.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci-workflow.spec.ts b/scripts/ci-workflow.spec.ts index d5c135c398..b5497b0e9e 100644 --- a/scripts/ci-workflow.spec.ts +++ b/scripts/ci-workflow.spec.ts @@ -288,6 +288,7 @@ describe('Python release workflows', () => { } expect(dispatch.inputs.publish).toMatchObject({ type: 'boolean', default: false }) + if (!isRecord(workflow.on)) throw new TypeError('python-release workflow must define on') expect(Object.keys(workflow.on)).toEqual(['workflow_dispatch']) expect(build).toMatchObject({ if: "github.event_name == 'workflow_dispatch'",