Skip to content
This repository was archived by the owner on Jun 13, 2026. It is now read-only.

Commit 00d4af6

Browse files
author
qiongyu1999
committed
fix: use vaunt score and handle pr merge events
1 parent a77b2f6 commit 00d4af6

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

scripts/action-handler.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ function resolveCurrentScore(args: {
342342
const state = args.existing?.scoreVersion === SCORE_VERSION ? args.existing.lastKnownScore + event : 0;
343343

344344
return {
345-
currentScore: Math.max(githubWeighted, state, event),
345+
currentScore: Math.max(vauntRankScore, githubWeighted, state, event),
346346
sources: { vauntRankScore, githubWeighted, state, event },
347347
};
348348
}
@@ -399,7 +399,11 @@ async function writeState(
399399
}
400400

401401
function extractContext(eventName: string, event: any): EventContext | null {
402-
if (eventName === "pull_request_target" && event.action === "closed" && event.pull_request?.merged) {
402+
if (
403+
(eventName === "pull_request" || eventName === "pull_request_target") &&
404+
event.action === "closed" &&
405+
event.pull_request?.merged
406+
) {
403407
return {
404408
actor: event.pull_request.user,
405409
threadNumber: event.pull_request.number,

0 commit comments

Comments
 (0)