You need to sign in or sign up before continuing.
Add functionality for bot message action
What does this MR do and why?
Add functionality for bot message action
- update any name of
bot_comment
tobot_message
to match yaml type - allow it to be added and removed
- add action selector
- show the bot message action by default
- address styling follow-up from !149931 (comment 1872323675)
- address comment !149931 (comment 1872323688)
What does this MR not do
- If there's no action with
type: send_bot_message
, it should be displayed the same way as withenabled: true
- When the action is removed, the YAML should be updated to the following:
actions: - type: send_bot_message enabled: false
- Showing example bot message
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 | |
3 | Update behavior around removing the send_bot_message action |
TBD |
3 | Complete design of bot comment action | TBD |
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 => Scroll to actions
- Verify the
send_bot_message
action is already in the yaml and the action shows up in rule mode - Verify two actions appear: the first is the approver action and the second is the bot comment action
- Verify the approver action updates the yaml
- Remove an action
- Verify the yaml is updated
- Remove both actions
- Verify the action key is removed
- Add an action back
- Verify the selector shows both action types
- Add the other one back
- Verify the selector shows the only remaining type
- Verify the selector disappears when both are added
Related to #438272 (closed)
Edited by Alexander Turinske