<commit_before>- time_format = '%b %e, %Y %l:%M%P %Z%z'

- if merge_request.merged?
  - mr_status_date = merge_request.merged_at
  - mr_status_title = _('Merged')
  - mr_status_icon = 'merge'
  - mr_status_class = 'merged'
- elsif merge_request.closed?
  - mr_status_date = merge_request.closed_event&.created_at
  - mr_status_title = _('Closed')
  - mr_status_icon = 'issue-close'
  - mr_status_class = 'closed'
- else
  - mr_status_date = merge_request.created_at
  - mr_status_title = _('Opened')
  - mr_status_icon = 'issue-open-m'
  - mr_status_class = 'open'

- mr_status_tooltip = "<div><span class=\"bold\">#{mr_status_title}</span> #{time_ago_in_words(mr_status_date)} ago</div><span class=\"text-tertiary\">#{l(mr_status_date.to_time, format: time_format)}</span>"

%span.mr-status-wrapper.suggestion-help-hover{ class: css_class, data: { toggle: 'tooltip', placement: 'bottom', html: 'true', title: mr_status_tooltip } }
  = sprite_icon(mr_status_icon, size: 16, css_class: "merge-request-status #{mr_status_class}")<commit_msg>Checking MR status date for related MR status tooltip<commit_after>- time_format = '%b %e, %Y %l:%M%P %Z%z'

- if merge_request.merged?
  - mr_status_date = merge_request.merged_at
  - mr_status_title = _('Merged')
  - mr_status_icon = 'merge'
  - mr_status_class = 'merged'
- elsif merge_request.closed?
  - mr_status_date = merge_request.closed_event&.created_at
  - mr_status_title = _('Closed')
  - mr_status_icon = 'issue-close'
  - mr_status_class = 'closed'
- else
  - mr_status_date = merge_request.created_at
  - mr_status_title = mr_status_date ? _('Opened') : _('Open')
  - mr_status_icon = 'issue-open-m'
  - mr_status_class = 'open'

- if mr_status_date
  - mr_status_tooltip = "<div><span class=\"bold\">#{mr_status_title}</span> #{time_ago_in_words(mr_status_date)} ago</div><span class=\"text-tertiary\">#{l(mr_status_date.to_time, format: time_format)}</span>"
- else
  - mr_status_tooltip = "<div><span class=\"bold\">#{mr_status_title}</span></div>"

%span.mr-status-wrapper.suggestion-help-hover{ class: css_class, data: { toggle: 'tooltip', placement: 'bottom', html: 'true', title: mr_status_tooltip } }
  = sprite_icon(mr_status_icon, size: 16, css_class: "merge-request-status #{mr_status_class}")
{'fraction_non_alphanumeric': 0.16106194690265488, 'fraction_numerical': 0.0017699115044247787, 'mean_word_length': 5.144021739130435, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '3432967', 'n_tokens_mistral': 883, 'n_tokens_neox': 880, 'n_words': 139}