Skip to content

Mark application bots when they are created instead of inferring them #38964

Backlog

Description

@yan-3005

Problem

Workflows can now list the bots whose changes start them (#38796). Only bots an admin created can be listed, so the server and the workflow builder must tell an application's bot apart from one an admin created. AppRepository.createNewAppBot stores an application's bot with provider: user, the same as an admin-created bot, so today both places infer it: an installed application links to the bot, or the bot is named <application name>Bot for an installed or marketplace application.

That inference has costs:

  • The rule exists twice (server WorkflowTriggeringBots, UI TriggeringBotsSection) and must be kept in sync by hand.
  • It relies on the "%sBot" naming in createNewAppBot; an application bot named otherwise looks admin-created.
  • The picker pages through every bot, installed application and marketplace definition each time the start node opens, and a user who cannot list applications gets no filter.

Proposal

Mark the bot when createNewAppBot creates it (for example a field on the bot that says it belongs to an application), with a migration for the application bots that already exist. The server check and the picker then read that one field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions