Feature flag audit log substitute `_` to ` `
Summary
@dosuken123
I found an odd appearance in the Audit page that underscore is not shown properly. In the below case, it should be shown as
merge_request
as the proper feature flag name.
Steps to reproduce
- Create feature flag with
_
in environment scope or name - Look at audit log of project
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version)
Output of checks
This bug happens on GitLab.com
Possible fixes
Original idea was to show custom messages in audit events the same way as they shown in /admin/audit_log
where _
are substituted with
regardless of message type
def action_text
action = @details.slice(*ACTIONS)
value = @details.values.first.tr('_', ' ')
#...
end
We can make and exception for custom_message
's in both places