Commit b68c1b5e authored by Phil Hughes's avatar Phil Hughes

Added codeowner section names to merge request edit form

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/227136
parent b3d6ac29
---
title: Added section names to code owner approvals in merge request form
merge_request:
author:
type: added
......@@ -17,7 +17,10 @@
%tbody{ data: { qa_selector: "approver_list" } }
- code_owner_rules.each do |code_owner_approval_rule|
%tr{ data: { qa_selector: "approver" } }
%td.monospace= code_owner_approval_rule.name
%td
- if code_owner_approval_rule.section != Gitlab::CodeOwners::Entry::DEFAULT_SECTION
%span.text-muted.small.d-block= code_owner_approval_rule.section
%span.monospace= code_owner_approval_rule.name
%td.d-none.d-sm-table-cell
- code_owner_approval_rule.approvers.each do |approver|
= user_avatar(user: approver)
......@@ -18,7 +18,7 @@ RSpec.describe 'Projects > Merge Requests > User edits a merge request' do
let(:project) do
create(:project, :custom_repo,
files: { 'docs/CODEOWNERS' => "*.rb @ruby-owner\n*.js @js-owner" })
files: { 'docs/CODEOWNERS' => "[Backend]\n*.rb @ruby-owner\n*.js @js-owner" })
end
let(:merge_request) do
......@@ -51,6 +51,7 @@ RSpec.describe 'Projects > Merge Requests > User edits a merge request' do
visit(edit_project_merge_request_path(project, merge_request))
expect(page).to have_content('*.rb')
expect(page).to have_content('Backend')
expect(page).to have_link(href: user_path(ruby_owner))
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment