Skip to content

Add event type information for event stream in group push rules

What does this MR do and why?

This MR resolves the following issues:

... which are described in this epic and it's parent epic

All these issues were included in this MR because all affect the same two files only.

How to set up and validate locally (via UI)

1. (pre-requisite) Add Group audit events Stream
  1. Go to Menu -> Groups -> [Select Group] -> Security & Compliance -> Audit Events
  2. Click on Streams tab
  3. Add a Stream URL in Group audit events. Tip: https://webhook.site
2. Change the push rules for the group
  1. Go to Menu -> Groups -> [Select Group] -> Settings -> Repository
  2. Expand Pre-defined push rules section
  3. Change Maximum file size (MB) field.
  4. Change Prohibited file names regex field.
  5. Change Commit author's email regex field.
  6. Change Reject expression in commit messages regex field.
  7. Change Require expression in commit messages regex field.
  8. Change Branch name regex field.
  1. Wait for the response in your stream/webhook (step 1).

It will look like the following:

image

The same for the rest of the events, looking like this in these jsons:

{  
  ...
  "entity_type": "Group",  
  "target_type": "PushRule",
  "event_type": "group_push_rules_max_file_size_updated"
}
{  
  ...
  "entity_type": "Group",  
  "target_type": "PushRule",
  "event_type": "group_push_rules_branch_name_regex_updated"
}
{  
  ...
  "entity_type": "Group",  
  "target_type": "PushRule",
  "event_type": "group_push_rules_commit_message_regex_updated"
}
{  
  ...
  "entity_type": "Group",  
  "target_type": "PushRule",
  "event_type": "group_push_rules_commit_message_negative_regex_updated"
}
{  
  ...
  "entity_type": "Group",  
  "target_type": "PushRule",
  "event_type": "group_push_rules_author_email_regex_updated"
}
{  
  ...
  "entity_type": "Group",  
  "target_type": "PushRule",
  "event_type": "group_push_rules_file_name_regex_updated"
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Nate Rosandich

Merge request reports