Skip to content

Skip CLA check for bot accounts#3011

Closed
aconite33 wants to merge 3 commits intostablefrom
fix-cla-bot-skip
Closed

Skip CLA check for bot accounts#3011
aconite33 wants to merge 3 commits intostablefrom
fix-cla-bot-skip

Conversation

@aconite33
Copy link
Copy Markdown
Contributor

Summary

Fixes CLA check failures on bot PRs (e.g. #3009).

Adds a bot detection step that checks if the PR author's login ends with [bot]. When detected, sets a success status and skips the CLA assistant action entirely. The existing allowlist in the CLA assistant was not matching correctly for bot committers.

Test plan

Add a bot detection step that checks if the PR author's login ends
with [bot] (e.g. dependabot[bot], github-actions[bot], renovate[bot]).
When detected, the CLA check is skipped with a success status, and the
CLA assistant action is not invoked at all. This fixes CLA failures on
automated dependency PRs where the allowlist in the CLA assistant
action was not matching correctly.
liquidsec and others added 2 commits April 1, 2026 15:19
Instead of only checking the PR author, iterate over every unique
commit author and verify each is either an org member or a known
bot. Fixes CLA failures on PRs with mixed committers (e.g. dependabot
PRs that include org member commits due to branch divergence).
Replace string-based bot allowlist with API lookup of the account's
type field (returns "Bot" for GitHub App accounts, enforced server-side
and not spoofable). Also treat commits with no associated GitHub login
as non-exempt instead of silently skipping them.

Tested on aconite33/cla-workflow-test:
- PR #1 (human): correctly required CLA
- PR #3 (github-actions[bot]): correctly skipped via API type check
@aconite33 aconite33 closed this Apr 1, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92%. Comparing base (593fe04) to head (3e57912).
⚠️ Report is 8 commits behind head on stable.

Additional details and impacted files
@@          Coverage Diff           @@
##           stable   #3011   +/-   ##
======================================
- Coverage      92%     92%   -0%     
======================================
  Files         416     416           
  Lines       34690   34690           
======================================
- Hits        31667   31643   -24     
- Misses       3023    3047   +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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