fix(lint): apply biome cleanup for notification modules

This commit is contained in:
jeffusion
2026-03-24 13:17:09 +08:00
committed by 路遥知码力
parent 8f9910a3fd
commit 7aec1e452a
6 changed files with 12 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
import { configManager } from './config-manager.js';
import type { NotificationServiceConfig } from '../services/notification/types.js';
import { configManager } from './config-manager.js';
type AppConfig = import('./config-manager.js').AppConfig;

View File

@@ -6,9 +6,9 @@ import { codexEngine } from '../review/codex/codex-engine';
import { LocalRepoManager } from '../review/context/local-repo-manager';
import { SandboxExec } from '../review/context/sandbox-exec';
import { reviewEngine } from '../review/engine';
import { PullRequestDetails, giteaService } from '../services/gitea';
import { getNotificationManager } from '../services/notification-manager';
import type { NotificationContext } from '../services/notification/types';
import { PullRequestDetails, giteaService } from '../services/gitea';
import { logger } from '../utils/logger';
// Gitea webhook事件类型

View File

@@ -1,5 +1,8 @@
import { createNotificationManager, type NotificationManager } from './notification/notification-manager.js';
import { getNotificationConfigs } from '../config/index.js';
import {
type NotificationManager,
createNotificationManager,
} from './notification/notification-manager.js';
export function getNotificationManager(): NotificationManager {
const configs = getNotificationConfigs();

View File

@@ -41,17 +41,11 @@ export abstract class BaseNotificationService implements INotificationService {
await this.sendMessage(message);
}
protected abstract buildIssueCreatedMessage(
context: NotificationContext
): NotificationMessage;
protected abstract buildIssueCreatedMessage(context: NotificationContext): NotificationMessage;
protected abstract buildIssueClosedMessage(
context: NotificationContext
): NotificationMessage;
protected abstract buildIssueClosedMessage(context: NotificationContext): NotificationMessage;
protected abstract buildIssueAssignedMessage(
context: NotificationContext
): NotificationMessage;
protected abstract buildIssueAssignedMessage(context: NotificationContext): NotificationMessage;
protected abstract buildPrCreatedMessage(context: NotificationContext): NotificationMessage;

View File

@@ -1,10 +1,6 @@
import * as crypto from 'crypto';
import * as crypto from 'node:crypto';
import { BaseNotificationService } from '../base-notification-service.js';
import type {
NotificationContext,
NotificationMessage,
NotificationServiceConfig,
} from '../types.js';
import type { NotificationContext, NotificationMessage } from '../types.js';
type FeishuApiResponse = {
code?: number;
@@ -21,10 +17,6 @@ function parseFeishuResponse(raw: unknown): FeishuApiResponse {
export class FeishuNotificationService extends BaseNotificationService {
readonly provider = 'feishu' as const;
constructor(config: NotificationServiceConfig) {
super(config);
}
async sendMessage(message: NotificationMessage): Promise<void> {
if (!this.config.webhookUrl) {
throw new Error('Feishu webhook URL is not configured');

View File

@@ -1,9 +1,5 @@
import { BaseNotificationService } from '../base-notification-service.js';
import type {
NotificationContext,
NotificationMessage,
NotificationServiceConfig,
} from '../types.js';
import type { NotificationContext, NotificationMessage } from '../types.js';
type WeComApiResponse = {
errcode?: number;
@@ -13,10 +9,6 @@ type WeComApiResponse = {
export class WeComNotificationService extends BaseNotificationService {
readonly provider = 'wecom' as const;
constructor(config: NotificationServiceConfig) {
super(config);
}
async sendMessage(message: NotificationMessage): Promise<void> {
if (!this.config.webhookUrl) {
throw new Error('WeCom webhook URL is not configured');