Skip to content

feat(github): add username filtering helper for bot exclusion#8716

Open
KyriosGN0 wants to merge 6 commits intoapache:mainfrom
KyriosGN0:filtering
Open

feat(github): add username filtering helper for bot exclusion#8716
KyriosGN0 wants to merge 6 commits intoapache:mainfrom
KyriosGN0:filtering

Conversation

@KyriosGN0
Copy link

@KyriosGN0 KyriosGN0 commented Feb 15, 2026

⚠️ Pre Checklist

Please complete ALL items in this checklist, and remove before submitting

  • I have read through the Contributing Documentation.
  • I have added relevant tests.
  • I have added relevant documentation.
  • I will add labels to the PR, such as pr-type/bug-fix, pr-type/feature-development, etc.

Summary

What does this PR do?

This PR introduces a new env var for the github data source to filter PR by username, this is useful for filtering out comments, reviews, PRs by bots, who might skew DORA metrics

Does this close any open issues?

Closes #8289

Screenshots

Include any relevant screenshots here.

Other Information

Any other information that is important to this PR.
NOTE: I haven't been able to build the backend-docker image, so haven't been able to test it locally

KyriosGN0 and others added 6 commits February 15, 2026 21:49
Implements shouldSkipByUsername() function to filter bot accounts
by username using GITHUB_PR_EXCLUDELIST environment variable.

- Case-insensitive matching
- Comma-separated list support
- Whitespace trimming
- Returns false for empty usernames or empty exclusion list

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: AvivGuiser <avivguiser@gmail.com>
Adds username filtering to PR extractor to skip bot-authored PRs
when GITHUB_PR_EXCLUDELIST is set.

- Checks author username before extraction
- Logs debug message when PR is skipped
- Includes unit test for bot filtering
- Includes e2e test data for bot filtering

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds username filtering to review extractor to skip bot reviews
when GITHUB_PR_EXCLUDELIST is set.

- Checks reviewer username before extraction
- Logs debug message when review is skipped
- Includes e2e test for bot filtering

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds username filtering to PR review comment extractor to skip
bot comments when GITHUB_PR_EXCLUDELIST is set.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds username filtering to issue comment extractor to skip
bot comments when GITHUB_PR_EXCLUDELIST is set.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Documents GITHUB_PR_EXCLUDELIST configuration and usage.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. component/plugins This issue or PR relates to plugins pr-type/feature-development This PR is to develop a new feature priority/medium This issue is medium important labels Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/plugins This issue or PR relates to plugins pr-type/feature-development This PR is to develop a new feature priority/medium This issue is medium important size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature][GitHub] allow filtering PRs.

1 participant