feat: add actor-based comment filtering to GitHub data fetching #812
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
include_comments_by_actorandexclude_comments_by_actorinputs in action.yml to allow filtering of comments based on actor usernames.filterCommentsByActorfunction to filter comments according to specified inclusion and exclusion patterns.fetchGitHubDatato apply actor filters when retrieving comments from pull requests and issues.This enhancement provides more control over which comments are processed based on the actor, improving the flexibility of the workflow.
Added two new action inputs (include_comments_by_actor and exclude_comments_by_actor) that let you filter which comments Claude sees based on the comment author's username. Works with wildcards like *[bot] to match all bot accounts.
Why You Need It
Token cost reduction and noise elimination. When PRs have hundreds of bot comments (dependabot, renovate, CI bots, etc.), Claude wastes tokens processing irrelevant content. This can significantly increase your Anthropic API costs and slow down responses.
Problem It Solves
Before:
A PR with 50 dependabot comments + 20 renovate comments + 10 human comments = Claude processes all 80 comments
High token usage → Higher costs
Claude may get distracted by bot noise when reviewing actual code changes
After:
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
exclude_comments_by_actor: "*[bot]" # Exclude all bots
Same PR = Claude only processes 10 human comments
88% token reduction in this example
Claude focuses on relevant human feedback
Lower API costs, faster responses