<commit_before>.mr-state-widget
  = render 'projects/merge_requests/widget/heading'
  .mr-widget-body
    - if @project.archived?
      = render 'projects/merge_requests/widget/open/archived'
    - elsif @merge_request.commits.blank?
      = render 'projects/merge_requests/widget/open/nothing'
    - elsif @merge_request.branch_missing?
      = render 'projects/merge_requests/widget/open/missing_branch'
    - elsif @merge_request.unchecked?
      = render 'projects/merge_requests/widget/open/check'
    - elsif @merge_request.cannot_be_merged? && !params[:resolved_conflicts]
      = render 'projects/merge_requests/widget/open/conflicts'
    - elsif @merge_request.work_in_progress?
      = render 'projects/merge_requests/widget/open/wip'
    - elsif @merge_request.merge_when_build_succeeds?
      = render 'projects/merge_requests/widget/open/merge_when_build_succeeds'
    - elsif !@merge_request.can_be_merged_by?(current_user)
      = render 'projects/merge_requests/widget/open/not_allowed'
    - elsif !@merge_request.mergeable_ci_state? && @pipeline && @pipeline.failed?
      = render 'projects/merge_requests/widget/open/build_failed'
    - elsif @merge_request.can_be_merged?
      = render 'projects/merge_requests/widget/open/accept'

  - if mr_closes_issues.present?
    .mr-widget-footer
      %span
        %i.fa.fa-check
        Accepting this merge request will close #{"issue".pluralize(mr_closes_issues.size)}
        = succeed '.' do
          != markdown issues_sentence(mr_closes_issues), pipeline: :gfm, author: @merge_request.author
<commit_msg>Fix bug where merge widget wouldn't show up after resolving conflicts<commit_after>.mr-state-widget
  = render 'projects/merge_requests/widget/heading'
  .mr-widget-body
    -# After conflicts are resolved, the user is redirected back to the MR page.
    -# There is a short window before background workers run and GitLab processes
    -# the new push and commits, during which it will think the conflicts still exist.
    -# We send this param to get the widget to treat the MR as having no more conflicts.
    - resolved_conflicts = params[:resolved_conflicts]

    - if @project.archived?
      = render 'projects/merge_requests/widget/open/archived'
    - elsif @merge_request.commits.blank?
      = render 'projects/merge_requests/widget/open/nothing'
    - elsif @merge_request.branch_missing?
      = render 'projects/merge_requests/widget/open/missing_branch'
    - elsif @merge_request.unchecked?
      = render 'projects/merge_requests/widget/open/check'
    - elsif @merge_request.cannot_be_merged? && !resolved_conflicts
      = render 'projects/merge_requests/widget/open/conflicts'
    - elsif @merge_request.work_in_progress?
      = render 'projects/merge_requests/widget/open/wip'
    - elsif @merge_request.merge_when_build_succeeds?
      = render 'projects/merge_requests/widget/open/merge_when_build_succeeds'
    - elsif !@merge_request.can_be_merged_by?(current_user)
      = render 'projects/merge_requests/widget/open/not_allowed'
    - elsif !@merge_request.mergeable_ci_state? && @pipeline && @pipeline.failed?
      = render 'projects/merge_requests/widget/open/build_failed'
    - elsif @merge_request.can_be_merged? || resolved_conflicts
      = render 'projects/merge_requests/widget/open/accept'

  - if mr_closes_issues.present?
    .mr-widget-footer
      %span
        %i.fa.fa-check
        Accepting this merge request will close #{"issue".pluralize(mr_closes_issues.size)}
        = succeed '.' do
          != markdown issues_sentence(mr_closes_issues), pipeline: :gfm, author: @merge_request.author

{'fraction_non_alphanumeric': 0.10398230088495575, 'fraction_numerical': 0.0, 'mean_word_length': 3.7342931937172774, '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': '2365638', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1135, 'n_words': 203}