Create bot comment action
What does this MR do and why?
Create bot comment action
- conditionally render based on feature flag
- conditionally render based on action type
- update tests
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 => yaml mode
- Use the below yaml
type: approval_policy
name: ''
description: ''
enabled: true
rules:
- type: ''
actions:
- type: require_approval
approvals_required: 1
- type: send_bot_comment
approval_settings:
block_branch_modification: true
prevent_pushing_and_force_pushing: true
- Navigate back to 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
Related to #438272 (closed)