From eb3fe50d9944ce6e1b4fef3fbe58f5e35269fd35 Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Wed, 20 Nov 2024 22:26:02 +0800 Subject: [PATCH] chore: update pre-publish script --- scripts/pre-publish.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/pre-publish.ts b/scripts/pre-publish.ts index a34b21b585..cd129758b1 100644 --- a/scripts/pre-publish.ts +++ b/scripts/pre-publish.ts @@ -18,6 +18,8 @@ const blockStatus = ['failure', 'cancelled', 'timed_out'] as const; const spinner = { interval: 80, frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'] }; const spinnies = new Spinnies({ spinner }); +const IGNORE_ACTIONS = ['Check Virtual Regression Approval', 'issue-remove-inactive']; + let spinniesId = 0; // `spinnies` 为按条目进度,需要做简单的封装变成接近 `ora` 的形态 @@ -150,8 +152,8 @@ const runPrePublish = async () => { ref: sha, }); showMessage(`远程分支 CI 状态(${check_runs.length}):`, 'succeed'); - check_runs = check_runs.filter( - (run) => !run.name.padEnd(36).includes('Check Virtual Regression Approval'), + check_runs = check_runs.filter((run) => + IGNORE_ACTIONS.every((action) => !run.name.includes(action)), ); check_runs.forEach((run) => { showMessage(` ${run.name.padEnd(36)} ${emojify(run.status)} ${emojify(run.conclusion || '')}`);