<commit_before>- page_title @milestone.title, "Milestones"
%h4.page-title
  .issue-box{ class: issue_box_class(@milestone) }
    - if @milestone.closed?
      Closed
    - elsif @milestone.expired?
      Expired
    - else
      Open
  Milestone ##{@milestone.iid}
  %small.creator
    = @milestone.expires_at
  .pull-right
    - if can?(current_user, :admin_milestone, @project)
      = link_to edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-grouped" do
        %i.fa.fa-pencil-square-o
        Edit
      - if @milestone.active?
        = link_to 'Close Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-grouped"
      - else
        = link_to 'Reopen Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-grouped"

%hr
- if @milestone.issues.any? && @milestone.can_be_closed?
  .alert.alert-success
    %span All issues for this milestone are closed. You may close milestone now.

%h3.issue-title
  = gfm escape_once(@milestone.title)
%div
  - if @milestone.description.present?
    .description
      .wiki
        = preserve do
          = markdown @milestone.description

%hr
.context
  %p.lead
    Progress:
    #{@milestone.closed_items_count} closed
    &ndash;
    #{@milestone.open_items_count} open
    &nbsp;
    %span.light #{@milestone.percent_complete}% complete
    %span.pull-right= @milestone.expires_at
  = milestone_progress_bar(@milestone)


%ul.nav.nav-tabs
  %li.active
    = link_to '#tab-issues', 'data-toggle' => 'tab' do
      Issues
      %span.badge= @issues.count
  %li
    = link_to '#tab-merge-requests', 'data-toggle' => 'tab' do
      Merge Requests
      %span.badge= @merge_requests.count
  %li
    = link_to '#tab-participants', 'data-toggle' => 'tab' do
      Participants
      %span.badge= @users.count

  .pull-right
    - if can?(current_user, :write_issue, @project)
      = link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { milestone_id: @milestone.id }), class: "btn  btn-grouped", title: "New Issue" do
        %i.fa.fa-plus
        New Issue
    - if can?(current_user, :read_issue, @project)
      = link_to 'Browse Issues', namespace_project_issues_path(@milestone.project.namespace, @milestone.project, milestone_title: @milestone.title), class: "btn  edit-milestone-link btn-grouped"

.tab-content
  .tab-pane.active#tab-issues
    .row
      .col-md-4
        = render('issues', title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned, id: 'unassigned')
      .col-md-4
        = render('issues', title: 'Ongoing Issues (open and assigned)', issues: @issues.opened.assigned, id: 'ongoing')
      .col-md-4
        = render('issues', title: 'Completed Issues (closed)', issues: @issues.closed, id: 'closed')

  .tab-pane#tab-merge-requests
    .row
      .col-md-3
        = render('merge_requests', title: 'Work in progress (open and unassigned)', merge_requests: @merge_requests.opened.unassigned, id: 'unassigned')
      .col-md-3
        = render('merge_requests', title: 'Waiting for merge (open and assigned)', merge_requests: @merge_requests.opened.assigned, id: 'ongoing')
      .col-md-3
        = render('merge_requests', title: 'Rejected (closed)', merge_requests: @merge_requests.rejected, id: 'closed')
      .col-md-3
        .panel.panel-primary
          .panel-heading Merged
          %ul.well-list
            - @merge_requests.merged.each do |merge_request|
              = render 'merge_request', merge_request: merge_request

  .tab-pane#tab-participants
    %ul.bordered-list
      - @users.each do |user|
        %li
          = link_to user, title: user.name, class: "darken" do
            = image_tag avatar_icon(user.email, 32), class: "avatar s32"
            %strong= truncate(user.name, lenght: 40)
            %br
            %small.cgray= user.username
<commit_msg>Fix closed merge request scope at milestone page<commit_after>- page_title @milestone.title, "Milestones"
%h4.page-title
  .issue-box{ class: issue_box_class(@milestone) }
    - if @milestone.closed?
      Closed
    - elsif @milestone.expired?
      Expired
    - else
      Open
  Milestone ##{@milestone.iid}
  %small.creator
    = @milestone.expires_at
  .pull-right
    - if can?(current_user, :admin_milestone, @project)
      = link_to edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-grouped" do
        %i.fa.fa-pencil-square-o
        Edit
      - if @milestone.active?
        = link_to 'Close Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-grouped"
      - else
        = link_to 'Reopen Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-grouped"

%hr
- if @milestone.issues.any? && @milestone.can_be_closed?
  .alert.alert-success
    %span All issues for this milestone are closed. You may close milestone now.

%h3.issue-title
  = gfm escape_once(@milestone.title)
%div
  - if @milestone.description.present?
    .description
      .wiki
        = preserve do
          = markdown @milestone.description

%hr
.context
  %p.lead
    Progress:
    #{@milestone.closed_items_count} closed
    &ndash;
    #{@milestone.open_items_count} open
    &nbsp;
    %span.light #{@milestone.percent_complete}% complete
    %span.pull-right= @milestone.expires_at
  = milestone_progress_bar(@milestone)


%ul.nav.nav-tabs
  %li.active
    = link_to '#tab-issues', 'data-toggle' => 'tab' do
      Issues
      %span.badge= @issues.count
  %li
    = link_to '#tab-merge-requests', 'data-toggle' => 'tab' do
      Merge Requests
      %span.badge= @merge_requests.count
  %li
    = link_to '#tab-participants', 'data-toggle' => 'tab' do
      Participants
      %span.badge= @users.count

  .pull-right
    - if can?(current_user, :write_issue, @project)
      = link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { milestone_id: @milestone.id }), class: "btn  btn-grouped", title: "New Issue" do
        %i.fa.fa-plus
        New Issue
    - if can?(current_user, :read_issue, @project)
      = link_to 'Browse Issues', namespace_project_issues_path(@milestone.project.namespace, @milestone.project, milestone_title: @milestone.title), class: "btn  edit-milestone-link btn-grouped"

.tab-content
  .tab-pane.active#tab-issues
    .row
      .col-md-4
        = render('issues', title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned, id: 'unassigned')
      .col-md-4
        = render('issues', title: 'Ongoing Issues (open and assigned)', issues: @issues.opened.assigned, id: 'ongoing')
      .col-md-4
        = render('issues', title: 'Completed Issues (closed)', issues: @issues.closed, id: 'closed')

  .tab-pane#tab-merge-requests
    .row
      .col-md-3
        = render('merge_requests', title: 'Work in progress (open and unassigned)', merge_requests: @merge_requests.opened.unassigned, id: 'unassigned')
      .col-md-3
        = render('merge_requests', title: 'Waiting for merge (open and assigned)', merge_requests: @merge_requests.opened.assigned, id: 'ongoing')
      .col-md-3
        = render('merge_requests', title: 'Rejected (closed)', merge_requests: @merge_requests.closed, id: 'closed')
      .col-md-3
        .panel.panel-primary
          .panel-heading Merged
          %ul.well-list
            - @merge_requests.merged.each do |merge_request|
              = render 'merge_request', merge_request: merge_request

  .tab-pane#tab-participants
    %ul.bordered-list
      - @users.each do |user|
        %li
          = link_to user, title: user.name, class: "darken" do
            = image_tag avatar_icon(user.email, 32), class: "avatar s32"
            %strong= truncate(user.name, lenght: 40)
            %br
            %small.cgray= user.username

{'fraction_non_alphanumeric': 0.13367483839492622, 'fraction_numerical': 0.003658982802780827, 'mean_word_length': 3.1, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3096681', 'n_tokens_mistral': 2758, 'n_tokens_neox': 2700, 'n_words': 589}