Update rule mode for bot message action
What does this MR do and why?
Update rule mode for bot message action
- disable bot message aciton when removing it
- hide action in rule mode, but show
enabled: false
in yaml - show bot message action if the action is not in yaml
- since each type of action is a unique action, update actions by type instead of index
The iteration
Number | Description | MR |
---|---|---|
1 | Creates skeleton structure | Create bot comment action (!149931 - merged) |
2 | Allow adding bot comment action in rule mode and add yaml validation | Add functionality for bot message action (!150570 - merged) |
3 | Update behavior around removing the send_bot_message action |
|
4 | Complete design of bot comment action | Add example bot message to action (!151615 - merged) |
5 | Update yaml validation and alert behavior | Update yaml validation for actions (!151697 - merged) |
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Upload a GitLab Ultimate license
- Enable the feature flag
echo "Feature.enable(:approval_policy_disable_bot_comment)" | rails c
- Navigate to a project => Secure => Policies => New policy => Scan result policy
- Remove the bot message action
- Ensure the yaml still shows the action but
enabled: false
- Verify the bot message action can be added back
- Add the bot message action back
- Verify there is only one bot message action in the yaml and that it has
enabled: true
- Navigate to yaml mode and manually delete the bot message action. Navigate back to rule mode
- Verify that the bot message action still appears in rule mode
Related to #438272 (closed)
Edited by Alexander Turinske