From 77ee26b49ed9a771bb1a1d07938ba5ecb0d49a09 Mon Sep 17 00:00:00 2001 From: soobing Date: Mon, 20 Apr 2026 22:13:28 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20PR=20=ED=8C=8C=EC=9D=BC=20=EC=A7=91?= =?UTF-8?q?=EA=B3=84=EC=97=90=20rename=20=EC=83=81=ED=83=9C=20=ED=8F=AC?= =?UTF-8?q?=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fetchPRSubmissions 가 status 'added' 와 'modified' 만 집계하여, 파일명 규칙을 맞추기 위한 rename PR(예: soobing3.ts → soobing.ts)에서 rename 된 풀이가 집계되지 않던 문제를 수정한다. 영향: 재참여자 또는 파일명 교체 이력이 있는 유저의 학습 현황 누적 풀이 수가 실제보다 적게 표시되던 버그. Co-Authored-By: sounmind <37020415+sounmind@users.noreply.github.com> Co-Authored-By: Claude Opus 4.7 --- utils/learningData.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/utils/learningData.js b/utils/learningData.js index 6693046..2293e96 100644 --- a/utils/learningData.js +++ b/utils/learningData.js @@ -285,7 +285,7 @@ export async function fetchUserSolutions( /** * Fetches the files changed in a PR and returns those that match - * {problem-name}/{username}.{ext} and are added or modified. + * {problem-name}/{username}.{ext} and are added, modified, or renamed. * * @param {string} repoOwner * @param {string} repoName @@ -329,7 +329,12 @@ export async function fetchPRSubmissions( const results = []; for (const file of files) { - if (file.status !== "added" && file.status !== "modified") continue; + if ( + file.status !== "added" && + file.status !== "modified" && + file.status !== "renamed" + ) + continue; const match = file.filename.match(usernamePattern); if (match) {