Skip to content

Commit fbd82f0

Browse files
sounmindsoobingclaude
committed
feat: integrate learning status into PR webhook handler
Co-Authored-By: Soobin Bak <16860535+soobing@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1621da8 commit fbd82f0

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

β€Žhandlers/webhooks.jsβ€Ž

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { ALLOWED_REPO } from "../utils/constants.js";
2222
import { performAIReview, addReactionToComment } from "../utils/prReview.js";
2323
import { hasApprovedReview, safeJson } from "../utils/prActions.js";
2424
import { tagPatterns } from "./tag-patterns.js";
25+
import { postLearningStatus } from "./learning-status.js";
2526

2627
/**
2728
* GitHub webhook 이벀트 처리
@@ -270,6 +271,23 @@ async function handlePullRequestEvent(payload, env) {
270271
}
271272
}
272273

274+
// ν•™μŠ΅ ν˜„ν™© λŒ“κΈ€ (OPENAI_API_KEY μžˆμ„ λ•Œλ§Œ)
275+
if (env.OPENAI_API_KEY) {
276+
try {
277+
await postLearningStatus(
278+
repoOwner,
279+
repoName,
280+
prNumber,
281+
pr.user.login,
282+
appToken,
283+
env.OPENAI_API_KEY
284+
);
285+
} catch (error) {
286+
console.error(`[handlePullRequestEvent] learningStatus failed: ${error.message}`);
287+
// ν•™μŠ΅ ν˜„ν™© μ‹€νŒ¨λŠ” 전체 흐름을 μ€‘λ‹¨μ‹œν‚€μ§€ μ•ŠμŒ
288+
}
289+
}
290+
273291
return corsResponse({
274292
message: "Processed",
275293
pr: prNumber,

0 commit comments

Comments
Β (0)