<commit_before>'use strict';

angular.module('deckApp.delivery.executionTransformer.service', [
  'deckApp.orchestratedItem.service',
  'deckApp.utils.lodash',
  'deckApp.pipelines.config',
])
  .factory('executionsTransformer', function(orchestratedItem, _, pipelineConfig) {

    function transformExecution(execution) {
      pipelineConfig.getExecutionTransformers().forEach(function(transformer) {
        transformer.transform(execution);
      });
      var stageSummaries = [];

      execution.stages.forEach(function(stage, index) {
        stage.before = stage.before || [];
        stage.after = stage.after || [];
        stage.index = index;
        orchestratedItem.defineProperties(stage);
        if (stage.tasks && stage.tasks.length) {
          stage.tasks.forEach(orchestratedItem.defineProperties);
        }
      });

      execution.stages.forEach(function(stage) {
        var owner = stage.syntheticStageOwner;
        var parent = _.find(execution.stages, { id: stage.parentStageId });
        if (parent) {
          if (owner === 'STAGE_BEFORE') {
            parent.before.push(stage);
          }
          if (owner === 'STAGE_AFTER') {
            parent.after.push(stage);
          }
        }
      });

      execution.stages.forEach(function(stage) {
        if (!stage.syntheticStageOwner) {
          stageSummaries.push({
            name: stage.name,
            id: stage.id,
            masterStage: stage,
            type: stage.type,
            before: stage.before,
            after: stage.after,
            status: stage.status
          });
        }
      });

      orchestratedItem.defineProperties(execution);

      stageSummaries.forEach(transformStageSummary);
      execution.stageSummaries = stageSummaries;
      execution.currentStages = getCurrentStages(execution);
<commit_msg>Avoiding displaying the synthetic pipelineInitialization stage<commit_after>'use strict';

angular.module('deckApp.delivery.executionTransformer.service', [
  'deckApp.orchestratedItem.service',
  'deckApp.utils.lodash',
  'deckApp.pipelines.config',
])
  .factory('executionsTransformer', function(orchestratedItem, _, pipelineConfig) {

    function transformExecution(execution) {
      pipelineConfig.getExecutionTransformers().forEach(function(transformer) {
        transformer.transform(execution);
      });
      var stageSummaries = [];

      execution.stages.forEach(function(stage, index) {
        stage.before = stage.before || [];
        stage.after = stage.after || [];
        stage.index = index;
        orchestratedItem.defineProperties(stage);
        if (stage.tasks && stage.tasks.length) {
          stage.tasks.forEach(orchestratedItem.defineProperties);
        }
      });

      execution.stages.forEach(function(stage) {
        var owner = stage.syntheticStageOwner;
        var parent = _.find(execution.stages, { id: stage.parentStageId });
        if (parent) {
          if (owner === 'STAGE_BEFORE') {
            parent.before.push(stage);
          }
          if (owner === 'STAGE_AFTER') {
            parent.after.push(stage);
          }
        }
      });

      execution.stages.forEach(function(stage) {
        if (!stage.syntheticStageOwner && stage.type !== 'pipelineInitialization') {
          stageSummaries.push({
            name: stage.name,
            id: stage.id,
            masterStage: stage,
            type: stage.type,
            before: stage.before,
            after: stage.after,
            status: stage.status
          });
        }
      });

      orchestratedItem.defineProperties(execution);

      stageSummaries.forEach(transformStageSummary);
      execution.stageSummaries = stageSummaries;
      execution.currentStages = getCurrentStages(execution);

{'fraction_non_alphanumeric': 0.1201058201058201, 'fraction_numerical': 0.0, 'mean_word_length': 2.440400363967243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2651710', 'n_tokens_mistral': 1052, 'n_tokens_neox': 1037, 'n_words': 149}