/** * rainbow 模式的额外参数 */ export interface IRainbowAuditorOptions { /** 项目名 */ projectName: string; /** 子工程名 */ subProjectName: string; /** minimatch 方法 */ minimatch: Function; } /** * json 模式的额外参数 */ export interface IJsonAuditorOptions { /** 项目名 */ projectName: string; /** 配置 key(如 versionType) */ key: string; } /** * getAuditor 的参数 */ export interface IGetAuditorOptions { /** 审核类型:'rainbow' | 'json' | 'static' */ type: 'rainbow' | 'json' | 'static'; /** * 审核配置数据源(rainbow 和 json 模式需要) * - 传入 string:作为配置文件路径,同步读取 * - 传入函数:异步获取配置数据 */ configSource?: string | (() => Promise>); /** rainbow 模式的额外参数 */ rainbowOptions?: IRainbowAuditorOptions; /** json 模式的额外参数 */ jsonOptions?: IJsonAuditorOptions; /** 静态审核人列表(static 模式) */ staticAuditorList?: string[]; /** 是否跳过审核(例如非生产环境或由参数控制) */ skipAudit?: boolean; } /** * getAuditor 的返回值 */ export interface IGetAuditorResult { /** 审核人,逗号分隔 */ auditor: string; /** 是否需要审核 */ shouldAudit: boolean; } /** * buildAuditContent 的参数 */ export interface IBuildAuditContentOptions { /** 审核标题,如 '【H5发布审核】' */ title: string; /** 项目名,传空或不传时不展示项目行 */ projectName?: string; /** 发起人 rtx */ creator: string; /** 审核人原始字符串,逗号分隔 */ auditor: string; /** 构建链接 */ buildUrl: string; /** 差异化的额外行,如子工程、分支、灰度比例等 */ extraLines?: string[]; } /** * checkAuditResult 的审核结果信息 */ export interface IAuditResultInfo { /** 审核状态:PROCESS 通过 / ABORT 驳回 */ status: string; /** 审核人 */ reviewer: string; /** 审核意见 */ suggest: string; /** 构建链接 */ bkBuildUrl: string; } /** * checkAuditResult 的参数 */ export interface ICheckAuditResultOptions { /** 审核结果信息 */ resultInfo: IAuditResultInfo; /** 通知标题,如 '【H5发布】' '【组件库发布】' */ title: string; /** 差异化的通知内容行(项目名、子工程、分支等) */ contentLines: string[]; /** 发起人 rtx */ creator: string; /** 审核描述 */ auditDesc: string; /** 企微机器人 webhook key */ webhookUrl: string; }