@@ -40,7 +40,7 @@ import { loadPrefsForInstallation } from "./pr-comment-loader"
4040
4141const APP_BASE_URL = env . BETTER_AUTH_URL ?? ""
4242
43- // ─── Scope helper ──────────────────────────────────────────────
43+ // Scope helper
4444
4545type ScopeKey = "pullRequests" | "issues" | "comments"
4646
@@ -81,7 +81,7 @@ function ruleApplies(
8181 return scope [ key ]
8282}
8383
84- // ─── Types ─────────────────────────────────────────────────────
84+ // Types
8585
8686export interface WebhookContext {
8787 installationId : number
@@ -189,7 +189,7 @@ function resolveOutcome(
189189 return "logged"
190190}
191191
192- // ─── Near-miss threshold ───────────────────────────────────────
192+ // Near-miss threshold
193193// A user is "near miss" if their value is within 20% of triggering.
194194const NEAR_MISS_RATIO = 0.2
195195
@@ -207,7 +207,7 @@ function isNearMissMax(actual: number, limit: number): boolean {
207207 return actual >= limit * ( 1 - NEAR_MISS_RATIO )
208208}
209209
210- // ─── Content analysis helpers ──────────────────────────────────
210+ // Content analysis helpers
211211
212212/**
213213 * Detect the dominant script/language of text using Unicode code-point ranges.
@@ -355,7 +355,7 @@ function isLikelyLanguage(text: string, language: string): boolean {
355355 return detection . dominant === expected && detection . confidence > 0.3
356356}
357357
358- // ─── Crypto address detection ──────────────────────────────────
358+ // Crypto address detection
359359
360360const CRYPTO_PATTERNS : { name : string ; pattern : RegExp } [ ] = [
361361 // Bitcoin (legacy P2PKH/P2SH + SegWit bech32)
@@ -386,7 +386,7 @@ function detectCryptoAddress(
386386 return null
387387}
388388
389- // ─── Pipeline ──────────────────────────────────────────────────
389+ // Pipeline
390390
391391/**
392392 * Run all enabled rules against a GitHub user, collecting detailed
@@ -569,7 +569,7 @@ export async function runFilterPipeline(
569569 contentScope : scope ,
570570 }
571571
572- // ─── autoWhitelistGlobalVouches ───────────────────────────
572+ // autoWhitelistGlobalVouches
573573 if ( config . autoWhitelistGlobalVouches . enabled ) {
574574 const minVouches = config . autoWhitelistGlobalVouches . minVouches
575575 const vouchRows = await db
@@ -597,7 +597,7 @@ export async function runFilterPipeline(
597597 }
598598 }
599599
600- // ─── vouchedUsersOnly ──────────────────────────────────────
600+ // vouchedUsersOnly
601601 // Non-vouched users are rejected before any per-user GitHub lookups.
602602 // Whitelisted users already returned above (covers "repo" scope).
603603 // When vouchScope is "global" or "both", also check global vouches.
@@ -765,7 +765,7 @@ export async function runFilterPipeline(
765765 }
766766 }
767767
768- // ─── accountAge ────────────────────────────────────────────
768+ // accountAge
769769 if ( ruleApplies ( config . accountAge , contentType , scope ) && ghUser ) {
770770 rulesChecked ++
771771 const createdAt = new Date ( ghUser . created_at as string )
@@ -797,7 +797,7 @@ export async function runFilterPipeline(
797797 }
798798 }
799799
800- // ─── minMergedPrs ──────────────────────────────────────────
800+ // minMergedPrs
801801 if ( ruleApplies ( config . minMergedPrs , contentType , scope ) ) {
802802 rulesChecked ++
803803 try {
@@ -830,7 +830,7 @@ export async function runFilterPipeline(
830830 }
831831 }
832832
833- // ─── languageRequirement ───────────────────────────────────
833+ // languageRequirement
834834 if (
835835 ruleApplies ( config . languageRequirement , contentType , scope ) &&
836836 contentText &&
@@ -860,7 +860,7 @@ export async function runFilterPipeline(
860860 }
861861 }
862862
863- // ─── maxPrsPerDay ──────────────────────────────────────────
863+ // maxPrsPerDay
864864 if ( ruleApplies ( config . maxPrsPerDay , contentType , scope ) ) {
865865 rulesChecked ++
866866 try {
@@ -897,7 +897,7 @@ export async function runFilterPipeline(
897897 }
898898 }
899899
900- // ─── maxFilesChanged ───────────────────────────────────────
900+ // maxFilesChanged
901901 if ( ruleApplies ( config . maxFilesChanged , contentType , scope ) && ctx . prNumber ) {
902902 rulesChecked ++
903903 try {
@@ -940,7 +940,7 @@ export async function runFilterPipeline(
940940 }
941941 }
942942
943- // ─── repoActivityMinimum ───────────────────────────────────
943+ // repoActivityMinimum
944944 if ( ruleApplies ( config . repoActivityMinimum , contentType , scope ) ) {
945945 rulesChecked ++
946946 try {
@@ -977,7 +977,7 @@ export async function runFilterPipeline(
977977 }
978978 }
979979
980- // ─── requireProfileReadme ──────────────────────────────────
980+ // requireProfileReadme
981981 if ( ruleApplies ( config . requireProfileReadme , contentType , scope ) ) {
982982 rulesChecked ++
983983 try {
@@ -1010,7 +1010,7 @@ export async function runFilterPipeline(
10101010 }
10111011 }
10121012
1013- // ─── cryptoAddressDetection ────────────────────────────────
1013+ // cryptoAddressDetection
10141014 if (
10151015 ruleApplies ( config . cryptoAddressDetection , contentType , scope ) &&
10161016 contentText
@@ -1124,7 +1124,7 @@ export async function runFilterPipeline(
11241124 }
11251125}
11261126
1127- // ─── Pipeline event logging ────────────────────────────────────
1127+ // Pipeline event logging
11281128
11291129/**
11301130 * Generate a unique pipeline ID for grouping events from the same evaluation.
@@ -1292,7 +1292,7 @@ async function logPipelineEvents(
12921292 await logEvents ( eventBatch )
12931293}
12941294
1295- // ─── Webhook action handlers ───────────────────────────────────
1295+ // Webhook action handlers
12961296
12971297/**
12981298 * Execute the resolved action on a PR/issue/comment based on the pipeline result.
0 commit comments