Logical categorization of Bots
Problem to solve
Currently, all Bots are implicitly considered as Internal Bots.
The introduction of Project Bots required the ability to differentiate User defined Bots (e.g. Project Bots) from System or Internal Bots (e.g. Alert Bots).
With growing number of bots, it becomes essential to categorize bots.
The following are few suggestions discussed (read thread of full conversation):
-
Use a different naming convention of Bots than Internal and External. As the term external bots could contrast with the entity External Users. The purpose of a Bot still remains unchanged.
-
Instead of introducing different bot types, define scopes for individual bot users, similar to the scopes of personal access tokens. The scopes could be assigned during bot creation and we can check for them in policies. In the future, this could be extended to easily create new scopes.
Refactoring required:
Few changes introduced in !28169 (diffs) will require refactoring once this issue is fixed:
-
Remove the explicit check for project_bot
- Update
internal?
method in User model - Update
User.internal
- Update
User.non_internal
- Update
-
Verify if
bots_without_project_bot
andwithout_internal_bots
scopes in User model can be removed
What does success look like, and how can we measure that?
When a new Bot type is introduced, it should be easy to decouple and define it's capabilities.