MCPcopy Create free account
hub / github.com/anomalyco/opencode / addReaction

Function addReaction

packages/opencode/src/cli/cmd/github.handler.ts:1178–1203  ·  view source on GitHub ↗
(commentType?: "issue" | "pr_review")

Source from the content-addressed store, hash-verified

1176 }
1177
1178 async function addReaction(commentType?: "issue" | "pr_review") {
1179 // Only called for non-schedule events, so triggerCommentId is defined
1180 console.log("Adding reaction...")
1181 if (triggerCommentId) {
1182 if (commentType === "pr_review") {
1183 return await octoRest.rest.reactions.createForPullRequestReviewComment({
1184 owner,
1185 repo,
1186 comment_id: triggerCommentId!,
1187 content: AGENT_REACTION,
1188 })
1189 }
1190 return await octoRest.rest.reactions.createForIssueComment({
1191 owner,
1192 repo,
1193 comment_id: triggerCommentId!,
1194 content: AGENT_REACTION,
1195 })
1196 }
1197 return await octoRest.rest.reactions.createForIssue({
1198 owner,
1199 repo,
1200 issue_number: issueId!,
1201 content: AGENT_REACTION,
1202 })
1203 }
1204
1205 async function removeReaction(commentType?: "issue" | "pr_review") {
1206 // Only called for non-schedule events, so triggerCommentId is defined

Callers 1

github.handler.tsFile · 0.85

Calls 1

logMethod · 0.45

Tested by

no test coverage detected