Hey @Loeffeldude, thanks for tackling this - automation is definitely the right direction.
A few things we need to get right before merging, since the voting integrity is core to what we're doing here:
Vote calculation - Currently this only counts :+1:, but our frontend uses :+1: - :-1: (see lib/github.ts:156). Without this, downvotes are meaningless and the displayed rankings won't match what actually gets merged.
Merge safety - The script should skip PRs that:
- Have merge conflicts (check
mergeablestatus) - Have failing CI checks
- If top PR can't merge, try the next eligible one
Schedule - The cron runs weekly at 12:00 UTC Sunday, but our countdown shows daily at 19:00 UTC. Should be 0 19 * * *.
Pagination - Only fetches first 100 reactions per PR. We have PRs with a 1000+ reactions, so this would miss 90% of votes. See lib/github.ts:127-154 for how we handle this.
You mentioned wanting a single source of truth - agreed. Happy to discuss approaches if you want to pair on this.