Compare commits

..

1 Commits

Author SHA1 Message Date
Ashwin Bhat
7925dd1804 tmp 2025-07-04 10:23:17 -07:00

View File

@@ -14,8 +14,6 @@ import {
} from "../../context"; } from "../../context";
import type { Octokit } from "@octokit/rest"; import type { Octokit } from "@octokit/rest";
const CLAUDE_APP_BOT_ID = 209825114;
export async function createInitialComment( export async function createInitialComment(
octokit: Octokit, octokit: Octokit,
context: ParsedGitHubContext, context: ParsedGitHubContext,
@@ -38,15 +36,16 @@ export async function createInitialComment(
repo, repo,
issue_number: context.entityNumber, issue_number: context.entityNumber,
}); });
const existingComment = comments.data.find((comment) => { console.log("users");
const idMatch = comment.user?.id === CLAUDE_APP_BOT_ID; comments.data.forEach((comment) => {
const botNameMatch = console.log(comment.user);
comment.user?.type === "Bot" &&
comment.user?.login.toLowerCase().includes("claude");
const bodyMatch = comment.body === initialBody;
return idMatch || botNameMatch || bodyMatch;
}); });
const existingComment = comments.data.find(
(comment) =>
comment.user?.login.indexOf("claude[bot]") !== -1 ||
comment.body === initialBody,
);
if (existingComment) { if (existingComment) {
response = await octokit.rest.issues.updateComment({ response = await octokit.rest.issues.updateComment({
owner, owner,