Conversation
servers/mumu/src/github/schema.ts
Outdated
| action: z.enum(["created", "edited", "deleted"]), | ||
| issue: z.object({ | ||
| number: z.number(), | ||
| pull_request: z.object({}).passthrough().optional(), |
There was a problem hiding this comment.
'passthrough' 이 부분입니다.
pull_request: z.object({}).passthrough().optional(),There was a problem hiding this comment.
찾아보니 zod v4에서 deprecated 되었다고 합니다..?!
https://zod.dev/v4/changelog

There was a problem hiding this comment.
호호.. 커서가 그것까진 몰랐나봐요 ㅎ.. 수정하겠습니다
jogpfls
left a comment
There was a problem hiding this comment.
수고하셨습니다 !! 코드 너무 어렵네요... 코드리뷰하면서 많이 배워갑니다 !!! 😊
| try { | ||
| await slackNotifier.createThreadReply(thread.threadTs, text); | ||
| } catch { | ||
| console.error(`${cacheKey}/${thread.channel}: review comment 슬랙 스레드 답변 전송 실패`); | ||
| console.error(`${cacheKey}/${thread.channel}: 슬랙 스레드 답변 전송 실패`); | ||
| } | ||
|
|
||
| return JSON.stringify({ success: true, message: "Review comment processed successfully" }); | ||
| return JSON.stringify({ success: true, message: "Comment processed successfully" }); |
There was a problem hiding this comment.
createThreadReply이 실패했을 때 catch 블록이 에러를 잡으면 console.error만 찍고 끝난 다음에 success: true가 실행되고 있어서 slack 전송이 실패해도 성공으로 리턴하는 구조인 것 같은데 의도하신 구조이신가요 ?!
There was a problem hiding this comment.
오 아니에요! 요건 사실 저번에도 비슷한 리뷰를 받았었는데요. 어느 계층에서 로그를 남길것이냐를 고민하다가 저런 식으로 작성되었는데,
여기는 comment 핸들러 안에서의 메인 액션인 것 같아서 return문 하나 더 찍어두도록 하겠습니다. 나머지는 추후 리팩토링하겠습니다..!
| const preview = truncateBody(payload.comment.body); | ||
| const safePreview = escapeSlackLinkText(preview); | ||
|
|
||
| return [`> *${payload.comment.user.login}*`, `> <${payload.comment.html_url}|${safePreview}>`].join("\n"); |
There was a problem hiding this comment.
issueComment랑 reviewComment가 구분이 따로 안되고 있는 것 같은데 일부러 이렇게 구현하신걸까요 ? 아니시라면 앞에 [issueComment], [reviewComment] 이런식으로 붙여서 구분하는 건 어떻게 생각하시나요...? Just 개인적인 의견입니당....
There was a problem hiding this comment.
네네 사실 issue 코멘트랑 review 코멘트를 구분할 필요성을 못느꼈어서 따로 처리해두지는 않았습니다.
혜린님이 생각하신 구분되어야 할 이유가 혹시 무엇일까요 ?!

작업 내용
issue in payload로 분기하도록 통합Made with Cursor