Repository navigation
Description
Summary
When a corporate entity whitelists a bot for their project, then EasyCLA needs to
- Add a user record associated with that bot associated
cla-*-users.user_company_idequalscompany_idthat whitelisted the botcla-*-users.user_github_idequals GitHub API response {"id": #######}cla-*-users.user_github_usernameequals GitHub API response {"login": whitelisted_bot_name}cla-*-users.noteequals "[date] Added as part of [cla-*-projects.project_name], whitelisted by [cla-*-companies.company_name]
- Add a signature record for the new bot's user
cla-*-signatures.signature_user_ccla_company_idequals [cla-*-companies.company_id] that whitelisted the botcla-*-signatures.signature_signedequalstruecla-*-signatures.signature_approvedequalstruecla-*-signatures.signature_typeequalsclacla-*-signatures.signature_reference_typeequalsusercla-*-signatures.signature_reference_idequals [cla-*-users.user_id]cla-*-signatures.signature_project_idequals [cla-*-projects.project_id] that the CCLA is valid forcla-*-signatures.verisonequalsv1cla-*-signatures.noteequals "[date] Added as part of [cla-*-projects.project_name], whitelisted by [cla-*-companies.company_name]"
Background
When an entity whitelists a bot under a signed CCLA for a project and the bot attempts a PR on a CLA enforced repo then EasyCLA checks to see if the GitHub user is a bot. If the user is a bot, then EasyCLA automatically adds an affiliation confirmation signature record to the signature table
Sample:
https://api.github.com/users/dependabot-preview[bot]
{...
"type": "Bot",
...}
If GitHub Username is whitelisted and users API response is type: Bot then automatically confirm the association. In contrast, type: User will continue to require affiliation confirmation
User Story
As a project on GitHub, I need to be able to whitelist bots so that I can continue using the bots I need to manage contributions.
Acceptance Criteria
The "done" criteria when this feature or problem is resolved. Such as:
- Unit Tests added and running in CI
- Functional Tests updated to cover feature, if applicable
- Demonstrate the set of capabilities to the product team while the code is
running in the STAGING environment.
Activity
Allow Bots to be Whitelisted and Affiliated Automatically (#285)
WillsonHG commentedon Jul 6, 2020
Reopening this issue for discussion because there are duplicate entries of the bot being created and the when the CLA check runs, it pulls the first user it finds, regardless of whether it's the right one. The message in the logs states :
2020-07-06T20:57:13 WARNING cla: more than 1 user found in our user database - user: [<cla.models.dynamo_models.User object at 0x7efdbe729ad0>, <cla.models.dynamo_models.User object at 0x7efdbe729a50>] - will ONLY evaluate the first one
If the bot user selected does not have a signature entry for the current project, the bot will not pass the CLA check.
Options:
One bot - multiple ccla entries
a) Add more logic when looking for the bot in the user table to prevent duplicate bots being created for each company who adds it to their approved list. This will require removing the user_company_id from the bot entry in the users table. When the bot is added to a company's approved list, if the app finds an entry in the user table for the bot, it will not create another. It will then create a signature for the bot's user_id, the company's company_id, and the project's project_id.
Multiple bots - each bot has a ccla signature entry for the required project/company.
b) Instead of only checking the first user found, check every single bot user found for a signature for the project/company.
c) Bypass this behavior completely in favor of creating one user entry per bot. A project admin will request through the service desk that the bot be added to the approved list for the project. A signature entry is made for the bot user and project (icla).
WillsonHG commentedon Jul 7, 2020
@dealako
mlehotskylf commentedon Aug 19, 2025
We recently rolled out feature where bots can be whitelisted.
@lukaszgryglicki @jarias-lfx I believe we can close this ticket.
lukaszgryglicki commentedon Sep 17, 2025
Yes, closing.