Skip to content

[NO JIRA] Moving claude code bot reaction and comments collection job from claude-code-action repo#30

Closed
moulougeta wants to merge 2 commits intomasterfrom
update_metrics_workflow
Closed

[NO JIRA] Moving claude code bot reaction and comments collection job from claude-code-action repo#30
moulougeta wants to merge 2 commits intomasterfrom
update_metrics_workflow

Conversation

@moulougeta
Copy link
Contributor

Context

[NO JIRA] Moving claude code bot reaction and comments collection job from claude-code-action repo

Checklist

@moulougeta moulougeta requested a review from a team as a code owner February 3, 2026 17:06
Copilot AI review requested due to automatic review settings February 3, 2026 17:06
@platon-github-app-production
Copy link

Comment /request-review to automatically request reviews from the following teams:

You can also request review from a specific team by commenting /request-review team-name, or you can add a description with --notes "<message>"

💡 If you see something that doesn't look right, check the configuration guide.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Changes: Maintenance (1)

This PR migrates a GitHub Actions workflow from the claude-code-action repository to this repository. The workflow collects and summarizes feedback (reactions and replies) on Claude bot comments across repositories in the transferwise organization.

Changes:

  • Added a scheduled workflow that runs nightly to gather Claude bot feedback statistics

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +156 to +164
// Find Claude bot comments (checking for common bot usernames)
const claudeComments = allComments.filter(comment => {
const username = comment.user?.login?.toLowerCase() || '';
return username.includes('claude') ||
(username === 'github-actions[bot]' && comment.body?.includes('Claude')) ||
username.includes('claude-bot') ||
username.includes('claudebot');
});

Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The Claude bot detection logic is duplicated in two places (lines 158-163 and lines 242-243). Consider extracting this into a helper function to ensure consistency and easier maintenance.

Suggested change
// Find Claude bot comments (checking for common bot usernames)
const claudeComments = allComments.filter(comment => {
const username = comment.user?.login?.toLowerCase() || '';
return username.includes('claude') ||
(username === 'github-actions[bot]' && comment.body?.includes('Claude')) ||
username.includes('claude-bot') ||
username.includes('claudebot');
});
// Helper to determine if a comment is from the Claude bot (or related bots)
function isClaudeBotComment(comment) {
const username = comment.user?.login?.toLowerCase() || '';
return username.includes('claude') ||
(username === 'github-actions[bot]' && comment.body?.includes('Claude')) ||
username.includes('claude-bot') ||
username.includes('claudebot');
}
// Find Claude bot comments (checking for common bot usernames)
const claudeComments = allComments.filter(isClaudeBotComment);

Copilot uses AI. Check for mistakes.
Comment on lines +239 to +243
// Check if comment is after Claude's and within our time window
return commentTime > claudeTime &&
commentTime >= cutoffTime &&
comment.user?.login?.toLowerCase() !== 'claude' &&
!comment.user?.login?.toLowerCase().includes('claude');
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

This bot detection logic is inconsistent with the more comprehensive check on lines 158-163. It misses checking for 'github-actions[bot]', 'claude-bot', and 'claudebot' variations. Use the same detection logic as above to avoid missing valid Claude bot comments.

Suggested change
// Check if comment is after Claude's and within our time window
return commentTime > claudeTime &&
commentTime >= cutoffTime &&
comment.user?.login?.toLowerCase() !== 'claude' &&
!comment.user?.login?.toLowerCase().includes('claude');
const login = comment.user?.login?.toLowerCase() || '';
// Check if comment is after Claude's and within our time window and not from a bot user
return commentTime > claudeTime &&
commentTime >= cutoffTime &&
login !== 'claude' &&
login !== 'claude-bot' &&
login !== 'claudebot' &&
login !== 'github-actions[bot]' &&
!login.endsWith('[bot]');

Copilot uses AI. Check for mistakes.

// Truncate comment to reasonable length for table display
const truncatedComment = reply.body?.substring(0, 100).replace(/\n/g, ' ') || '';
const commentDisplay = truncatedComment.length === 100 ? truncatedComment + '...' : truncatedComment;
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The logic checks if truncatedComment.length === 100 but should check if the original reply.body?.substring(0, 100) operation actually truncated content by comparing against reply.body?.length. A comment with exactly 100 characters won't get the ellipsis, while one with 101+ characters will, but this check doesn't accurately reflect whether truncation occurred.

Suggested change
const commentDisplay = truncatedComment.length === 100 ? truncatedComment + '...' : truncatedComment;
const commentDisplay = reply.body && reply.body.length > 100 ? truncatedComment + '...' : truncatedComment;

Copilot uses AI. Check for mistakes.
@moulougeta moulougeta closed this Feb 3, 2026
@moulougeta moulougeta deleted the update_metrics_workflow branch February 27, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants