stable

Clone or download

Read-only

feat: Create/Delete/update project bot in project admin UI

This is part of story #22696 configure mattermost bots at project level In the project admin menu, a new entry "Bot Mattermost" is added. It allows to Create/Delete/update project bots, with the very same limitations defined for system bots. For now, a project bot cannot have the same configuration of an already existing project or system bot with the same name + URL. These bots can then be used in the Mattermost notifications of the project. Notes ----- In newly created controllers, some errors lead to a rediction to the Tuleap homepage with non translated error messages. This is done on purpose, because these errors must not happen when using the UI (this can happen when forging a request for instance). Change-Id: Iff7b88ae0ecfcb623a25075fbb7eecd97bdf202b

Modified Files

Name
A include/BotMattermost/Administration/Project/CreateBotController.php +109 −0 Go to diff View file
A include/BotMattermost/Administration/Project/DeleteBotController.php +81 −0 Go to diff View file
A include/BotMattermost/Administration/Project/EditBotController.php +119 −0 Go to diff View file
A include/BotMattermost/Administration/Project/ListBotController.php +82 −0 Go to diff View file
A include/BotMattermost/Administration/Project/ProjectAdministrationPresenter.php +48 −0 Go to diff View file
A include/BotMattermost/Administration/Request/ParameterValidator.php +54 −0 Go to diff View file
A include/BotMattermost/Bot/BotCreator.php +86 −0 Go to diff View file
M include/BotMattermost/Bot/BotDao.php +8 −10 Go to diff View file
A include/BotMattermost/Bot/BotDeletor.php +50 −0 Go to diff View file
A include/BotMattermost/Bot/BotEditor.php +54 −0 Go to diff View file
M include/BotMattermost/Bot/BotFactory.php +22 −23 Go to diff View file
M include/BotMattermost/Controller/AdminController.php +20 −17 Go to diff View file
A include/BotMattermost/Exception/ProvidedBotParameterIsNotValidException.php +33 −0 Go to diff View file
M include/botmattermostPlugin.php +119 −11 Go to diff View file
A scripts/project-admin/modals.ts +68 −0 Go to diff View file
M site-content/fr_FR/LC_MESSAGES/tuleap-botmattermost.po +23 −2 Go to diff View file
R template/index.mustache Go to diff View file
R template/modal-add-bot.mustache Go to diff View file
R template/modal-delete-bot.mustache Go to diff View file
R template/modal-edit-bot.mustache Go to diff View file
A templates/project-admin/admin.mustache +67 −0 Go to diff View file
A templates/project-admin/modal-add-bot.mustache +46 −0 Go to diff View file
A templates/project-admin/modal-delete-bot.mustache +28 −0 Go to diff View file
A templates/project-admin/modal-edit-bot.mustache +54 −0 Go to diff View file
D tests/unit/BotMattermost/AdminControllerTest.php +0 −97 Go to diff View file
A tests/unit/BotMattermost/Administration/Request/ParameterValidatorTest.php +86 −0 Go to diff View file
A tests/unit/BotMattermost/Bot/BotCreatorTest.php +134 −0 Go to diff View file
A tests/unit/BotMattermost/Bot/BotDeletorTest.php +94 −0 Go to diff View file
A tests/unit/BotMattermost/Bot/BotEditorTest.php +140 −0 Go to diff View file
A tsconfig.json +8 −0 Go to diff View file
M webpack.common.js +9 −1 Go to diff View file