- can_update_merge_request = can?(current_user, :update_merge_request, @merge_request) - if @commits.empty? && @context_commits.empty? .commits-empty.mt-5 = custom_icon ('illustration_no_commits') %h4 = _('There are no commits yet.') - if can_update_merge_request %p = _('Push commits to the source branch or add previously merged commits to review them.') = render Pajamas::ButtonComponent.new(variant: 'confirm', button_options: { class: 'add-review-item-modal-trigger', data: { commits_empty: 'true', context_commits_empty: 'true' } }) do = _('Add previously merged commits') - else %ol#commits-list.list-unstyled = render "projects/commits/commits", merge_request: @merge_request - if can_update_merge_request && @merge_request.iid .add-review-item-modal-wrapper{ data: { context_commits_path: context_commits_project_json_merge_request_url(@merge_request&.project, @merge_request, :json), target_branch: @merge_request.target_branch, merge_request_iid: @merge_request.iid, project_id: @merge_request.project.id } }