Loading
Sort scan triggers by a canonical order instead of stored order
What does this MR do and why?
In a group's Security configuration page, opening Manage profiles for a scan profile shows its Scan triggers in an order that could change depending on toggle history, instead of staying fixed.
This renders triggers against the existing canonical allowedTriggersFor(scanType) order instead, so the displayed order is fixed (for example Merge request, Branch, Secret push protection for Secret Detection) no matter which trigger was most recently toggled.
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Have a GitLab Ultimate licence and enable the flag for a group:
echo "Feature.enable(:custom_scan_profiles_ui)" | gdk rails c - Open a group's Security configuration page.
- Open Manage profiles for a profile with more than one trigger.
- Edit the profile, disable one of its triggers, save, then re-enable it and save again.
- Reopen Manage profiles and confirm the trigger order stays fixed.
References
Edited by Chen Charnolevsky