Skip to content
Snippets Groups Projects

Add audit events for merge request settings

Merged Harsimar Sandhu requested to merge 355805-merge-request-settings-audit-events into master
3 files
+ 9
8
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -48,7 +48,7 @@ def to_h
def audit_protected_branch_add(model)
message = "Added #{model.class.name.underscore.humanize.downcase} #{model.name} to #{self.name} status check"
message += " and removed All Branches from status check" if protected_branches.count == 1
message += " and removed all branches from status check" if protected_branches.count == 1
push_audit_event(message)
end
@@ -61,11 +61,12 @@ def audit_deletion
end
def audit_protected_branch_remove(model)
if protected_branches.blank?
message = "Added all branches to #{self.name} status check"
else
message = "Removed #{model.class.name.underscore.humanize.downcase} #{model.name} from #{self.name} status check"
end
message = if protected_branches.blank?
"Added all branches to #{self.name} status check"
else
"Removed #{model.class.name.underscore.humanize.downcase} #{model.name} from #{self.name} status check"
end
push_audit_event(message)
end
Loading