<commit_before>- project = local_assigns[:project]

.context.prepend-top-default
  .milestone-summary
    %h4 Progress

    .milestone-stats-and-buttons
      .milestone-stats
        %span.milestone-stat.with-drilldown
          %strong= milestone.issues_visible_to_user(current_user).size
          issues:
        %span.milestone-stat
          %strong= milestone.issues_visible_to_user(current_user).opened.size
          open and
          %strong= milestone.issues_visible_to_user(current_user).closed.size
          closed
        %span.milestone-stat.with-drilldown
          %strong= milestone.merge_requests.size
          merge requests:
        %span.milestone-stat
          %strong= milestone.merge_requests.opened.size
          open and
          %strong= milestone.merge_requests.merged.size
          merged
        %span.milestone-stat
          %strong== #{milestone.percent_complete(current_user)}%
          complete
        %span.milestone-stat
          %span.remaining-days= milestone_remaining_days(milestone)

      .milestone-progress-buttons
        %span.tab-issues-buttons
          - if project && can?(current_user, :create_issue, project)
            = link_to new_namespace_project_issue_path(project.namespace, project, issue: { milestone_id: milestone.id }), class: "btn", title: "New Issue" do
              New Issue
          = link_to 'Browse Issues', milestones_browse_issuables_path(milestone, type: :issues), class: "btn"
        %span.tab-merge-requests-buttons.hidden
          = link_to 'Browse Merge Requests', milestones_browse_issuables_path(milestone, type: :merge_requests), class: "btn"

    = milestone_progress_bar(milestone)<commit_msg>Displays milestone remaining days only when it's present<commit_after>- project = local_assigns[:project]

.context.prepend-top-default
  .milestone-summary
    %h4 Progress

    .milestone-stats-and-buttons
      .milestone-stats
        %span.milestone-stat.with-drilldown
          %strong= milestone.issues_visible_to_user(current_user).size
          issues:
        %span.milestone-stat
          %strong= milestone.issues_visible_to_user(current_user).opened.size
          open and
          %strong= milestone.issues_visible_to_user(current_user).closed.size
          closed
        %span.milestone-stat.with-drilldown
          %strong= milestone.merge_requests.size
          merge requests:
        %span.milestone-stat
          %strong= milestone.merge_requests.opened.size
          open and
          %strong= milestone.merge_requests.merged.size
          merged
        %span.milestone-stat
          %strong== #{milestone.percent_complete(current_user)}%
          complete
        - remaining_days = milestone_remaining_days(milestone)
        - if remaining_days.present?
          %span.milestone-stat
            %span.remaining-days= remaining_days

      .milestone-progress-buttons
        %span.tab-issues-buttons
          - if project && can?(current_user, :create_issue, project)
            = link_to new_namespace_project_issue_path(project.namespace, project, issue: { milestone_id: milestone.id }), class: "btn", title: "New Issue" do
              New Issue
          = link_to 'Browse Issues', milestones_browse_issuables_path(milestone, type: :issues), class: "btn"
        %span.tab-merge-requests-buttons.hidden
          = link_to 'Browse Merge Requests', milestones_browse_issuables_path(milestone, type: :merge_requests), class: "btn"

    = milestone_progress_bar(milestone)
{'fraction_non_alphanumeric': 0.09572649572649573, 'fraction_numerical': 0.0005698005698005698, 'mean_word_length': 2.7351063829787234, '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': '362108', 'n_tokens_mistral': 1051, 'n_tokens_neox': 1006, 'n_words': 172}