import type { Config } from './src/types'; const config: Config = { server: { port: 3000, }, repositories: [ // Leave empty to accept webhooks from any repo. // { owner: "myorg", repo: "myrepo" }, ], filters: { labels: { include: [], exclude: ['bot-ignore'], }, authors: { exclude: ['dependabot', 'renovate[bot]'], }, branches: { include: [], // empty = all branches }, }, engine: { backends: { // Queries GitHub Checks API for CI results (ESLint, Clippy, tests, builds). // Requires GITHUB_TOKEN. checks: { enabled: true }, // Analyzes PR diff: size, file count, test coverage, net additions/deletions. // Requires GITHUB_TOKEN. Only applies to pull_request events. diff: { enabled: true, maxChanges: 1000, // PRs above this line count are flagged as too large requireTests: false, // set true to flag PRs with no test file changes }, // Analyzes issue/PR body for structural quality: description length, // code blocks, reproduction steps, linked issues, test plans. // Works without a token (pure text analysis). quality: { enabled: true, minBodyLength: 50, // minimum characters for an "adequate" description }, }, // Relative importance of each backend when combining results. weights: { checks: 0.4, diff: 0.3, quality: 0.3, }, // Below this combined confidence, classify as neutral. confidenceThreshold: 0.1, }, response: { includeConfidence: true, includeReasoning: true, // One message is picked at random from the list matching the impact. // Placeholders: // - {type} (issue/pull request), // - {impact} (positive/negative/neutral) messages: { positive: [ 'This {type} looks great for the trout! All signals point upstream.', 'The trout approve of this {type}. Swim on!', 'Splashing good news - this {type} is looking healthy.', ], negative: [ 'This {type} is muddying the waters. The trout are concerned.', 'Warning: the trout sense trouble in this {type}.', 'Something smells fishy about this {type}. Please review.', ], neutral: [ 'The trout have no strong feelings about this {type}.', 'This {type} is neither upstream nor downstream. Neutral waters.', 'The trout are watching this {type} with mild interest.', ], }, commentMarker: '', allowUpdates: false, // set true to update comments when CI finishes (requires check_suite webhook) }, logging: { level: 'info', file: 'troutbot.log', }, // Polling mode: Watch for @troutbot mentions without webhooks. // Useful for monitoring multiple repos without needing webhook configuration. polling: { enabled: false, intervalMinutes: 5, // how often to check for new comments lookbackMinutes: 10, // how far back to look for comments on each poll }, }; export default config;