Skip to content
Snippets Groups Projects
Unverified Commit b413fb0b authored by Michael Große's avatar Michael Große
Browse files

feat: Trigger new event when changelog is trimmed :sparkles:

parent b5cf9c44
No related branches found
No related tags found
Loading
......@@ -91,6 +91,13 @@ class TaskRunner
$out_lines = array_merge(array_slice($old_lines, -$extra), $out_lines);
}
$eventData = [
'trimmedChangelogLines' => $out_lines,
'removedChangelogLines' => $extra > 0 ? array_slice($old_lines, 0, -$extra) : $old_lines,
];
trigger_event('TRIM_RECENT_CHANGES', $eventData);
$out_lines = $eventData['trimmedChangelogLines'];
// save trimmed changelog
io_saveFile($fn . '_tmp', implode('', $out_lines));
@unlink($fn);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment