MCPcopy Index your code
hub / github.com/anomalyco/opencode / getReviewCommentContext

Function getReviewCommentContext

github/index.ts:252–268  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

250}
251
252function getReviewCommentContext() {
253 const context = useContext()
254 if (context.eventName !== "pull_request_review_comment") {
255 return null
256 }
257
258 const payload = context.payload as PullRequestReviewCommentEvent
259 return {
260 file: payload.comment.path,
261 diffHunk: payload.comment.diff_hunk,
262 line: payload.comment.line,
263 originalLine: payload.comment.original_line,
264 position: payload.comment.position,
265 commitId: payload.comment.commit_id,
266 originalCommitId: payload.comment.original_commit_id,
267 }
268}
269
270async function assertOpencodeConnected() {
271 let retry = 0

Callers 1

getUserPromptFunction · 0.70

Calls 1

useContextFunction · 0.85

Tested by

no test coverage detected