initial commit
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ic08e7c4b5b4f4072de9e2f9a701e977b6a6a6964
This commit is contained in:
commit
f8db097ba9
21 changed files with 4924 additions and 0 deletions
94
config.example.ts
Normal file
94
config.example.ts
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
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: '<!-- troutbot -->',
|
||||
allowUpdates: false, // set true to update comments when CI finishes (requires check_suite webhook)
|
||||
},
|
||||
|
||||
logging: {
|
||||
level: 'info',
|
||||
file: 'troutbot.log',
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
Loading…
Add table
Add a link
Reference in a new issue