mirror of
https://github.com/peakoss/anti-slop
synced 2026-12-01 13:39:13 +08:00
96 lines
2.5 KiB
TypeScript
96 lines
2.5 KiB
TypeScript
export interface Settings {
|
|
// Repo Auth Token
|
|
githubToken: string;
|
|
|
|
// General Settings
|
|
maxFailures: number;
|
|
|
|
// PR Branch Checks
|
|
allowedTargetBranches: string[];
|
|
blockedTargetBranches: string[];
|
|
allowedSourceBranches: string[];
|
|
blockedSourceBranches: string[];
|
|
|
|
// PR Quality Checks
|
|
maxNegativeReactions: number;
|
|
requireMaintainerCanModify: boolean;
|
|
|
|
// PR Title Checks
|
|
requireConventionalTitle: boolean;
|
|
|
|
// PR Description Checks
|
|
requireDescription: boolean;
|
|
maxDescriptionLength: number;
|
|
maxEmojiCount: number;
|
|
requirePrTemplate: boolean;
|
|
requireLinkedIssue: boolean;
|
|
blockedTerms: string[];
|
|
blockedIssueNumbers: string[];
|
|
|
|
// Commit Message Checks
|
|
requireConventionalCommits: boolean;
|
|
requireCommitAuthorMatch: boolean;
|
|
blockedCommitAuthors: string[];
|
|
|
|
// File Checks
|
|
allowedFileExtensions: string[];
|
|
allowedPaths: string[];
|
|
blockedPaths: string[];
|
|
requireFinalNewline: boolean;
|
|
|
|
// User Health Checks
|
|
minRepoMergedPrs: number;
|
|
minRepoMergeRatio: number;
|
|
minGlobalMergeRatio: number;
|
|
globalMergeRatioExcludeOwn: boolean;
|
|
minAccountAge: number;
|
|
|
|
// Filters
|
|
// onlyIssueTypes: string[];
|
|
// onlyLabels: string[];
|
|
// onlyPrLabels: string[];
|
|
// onlyIssueLabels: string[];
|
|
// anyOfLabels: string[];
|
|
// anyOfPrLabels: string[];
|
|
// anyOfIssueLabels: string[];
|
|
|
|
// Exemptions
|
|
exemptDraftPrs: boolean;
|
|
exemptBots: string[];
|
|
exemptUsers: string[];
|
|
exemptAuthorAssociation: string[];
|
|
// exemptTeams: string[];
|
|
exemptLabel: string;
|
|
exemptPrLabel: string;
|
|
// exemptIssueLabel: string;
|
|
exemptAllMilestones: boolean;
|
|
exemptAllPrMilestones: boolean;
|
|
// exemptAllIssueMilestones: boolean;
|
|
exemptMilestones: string[];
|
|
exemptPrMilestones: string[];
|
|
// exemptIssueMilestones: string[];
|
|
|
|
// PR Success Actions
|
|
successAddPrLabels: string[];
|
|
|
|
// PR Failure Actions
|
|
failureRemovePrLabels: string[];
|
|
failureRemoveAllPrLabels: boolean;
|
|
failureAddPrLabels: string[];
|
|
failurePrMessage: string;
|
|
closePr: boolean;
|
|
lockPr: boolean;
|
|
deleteBranch: boolean;
|
|
|
|
// Issue Close Actions
|
|
// closeIssue: boolean;
|
|
// closeIssueReason: string;
|
|
// lockIssue: boolean;
|
|
|
|
// Issue Failure Actions
|
|
// failureIssueMessage: string;
|
|
// failureRemoveIssueLabels: string[];
|
|
// failureRemoveAllIssueLabels: boolean;
|
|
// failureAddIssueLabels: string[];
|
|
}
|