Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/github/operations/comments/create-initial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function createInitialComment(
issue_number: context.entityNumber,
});
const existingComment = comments.data.find((comment) => {
const idMatch = comment.user?.id === CLAUDE_APP_BOT_ID;
const idMatch = comment.user?.id === CLAUDE_APP_BOT_ID || comment.user?.id === parseInt(context.inputs.botId);
Copy link

@ad-m-ss ad-m-ss Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const idMatch = comment.user?.id === CLAUDE_APP_BOT_ID || comment.user?.id === parseInt(context.inputs.botId);
const idMatch = comment.user?.id === parseInt(context.inputs.botId);

Why is there a need for a hardcoded constant if that value is also defined in https://github.com/huuyafwww/claude-code-action/blob/87cf21a4f276c5c71a16d388a981a6f16ba7af13/action.yml#L83 ? If there are no hardcoded constants, there won't be such mistakes, and there will only be one way for it to work.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW. That constant is duplicated:

export const CLAUDE_APP_BOT_ID = 41898282;
,
const CLAUDE_APP_BOT_ID = 209825114;

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two different numbers, so never mind.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ad-m-ss
Thank you!
I've fixed it in the following commit.

1b026cf

const botNameMatch =
comment.user?.type === "Bot" &&
comment.user?.login.toLowerCase().includes("claude");
Expand Down