Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6f68cace
Commit
6f68cace
authored
Jun 18, 2020
by
Ethan Reesor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include source branch in MR sidebar
parent
6dbe3e63
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
13 deletions
+32
-13
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+4
-2
app/views/projects/merge_requests/conflicts/show.html.haml
app/views/projects/merge_requests/conflicts/show.html.haml
+1
-1
app/views/projects/merge_requests/show.html.haml
app/views/projects/merge_requests/show.html.haml
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+18
-9
changelogs/unreleased/23767-add-branch-to-mr-sidebar.yml
changelogs/unreleased/23767-add-branch-to-mr-sidebar.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
app/assets/stylesheets/pages/issuable.scss
View file @
6f68cace
...
...
@@ -252,7 +252,8 @@
}
}
.cross-project-reference
{
.cross-project-reference
,
.sidebar-mr-source-branch
{
color
:
inherit
;
span
{
...
...
@@ -389,7 +390,8 @@
border-bottom
:
0
;
overflow
:
hidden
;
&
:hover
{
&
.with-sub-blocks
.sub-block
:hover
,
&
:not
(
.with-sub-blocks
)
:hover
{
background-color
:
$gray-100
;
}
...
...
app/views/projects/merge_requests/conflicts/show.html.haml
View file @
6f68cace
...
...
@@ -6,7 +6,7 @@
.merge-request-details.issuable-details
=
render
"projects/merge_requests/mr_box"
=
render
'shared/issuable/sidebar'
,
issuable_sidebar:
@issuable_sidebar
,
assignees:
@merge_request
.
assignees
=
render
'shared/issuable/sidebar'
,
issuable_sidebar:
@issuable_sidebar
,
assignees:
@merge_request
.
assignees
,
source_branch:
@merge_request
.
source_branch
#conflicts
{
"v-cloak"
=>
"true"
,
data:
{
conflicts_path:
conflicts_project_merge_request_path
(
@merge_request
.
project
,
@merge_request
,
format: :json
),
resolve_conflicts_path:
resolve_conflicts_project_merge_request_path
(
@merge_request
.
project
,
@merge_request
)
}
}
...
...
app/views/projects/merge_requests/show.html.haml
View file @
6f68cace
...
...
@@ -89,7 +89,7 @@
.loading.hide
.spinner.spinner-md
=
render
'shared/issuable/sidebar'
,
issuable_sidebar:
@issuable_sidebar
,
assignees:
@merge_request
.
assignees
=
render
'shared/issuable/sidebar'
,
issuable_sidebar:
@issuable_sidebar
,
assignees:
@merge_request
.
assignees
,
source_branch:
@merge_request
.
source_branch
-
if
@merge_request
.
can_be_reverted?
(
current_user
)
=
render
"projects/commit/change"
,
type:
'revert'
,
commit:
@merge_request
.
merge_commit
,
title:
@merge_request
.
title
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
6f68cace
...
...
@@ -151,15 +151,24 @@
.js-sidebar-subscriptions-entry-point
-
project_ref
=
issuable_sidebar
[
:reference
]
.block.project-reference
.sidebar-collapsed-icon.dont-change-state
=
clipboard_button
(
text:
project_ref
,
title:
_
(
'Copy reference'
),
placement:
"left"
,
boundary:
'viewport'
)
.cross-project-reference.hide-collapsed
%span
=
_
(
'Reference:'
)
%cite
{
title:
project_ref
}
=
project_ref
=
clipboard_button
(
text:
project_ref
,
title:
_
(
'Copy reference'
),
placement:
"left"
,
boundary:
'viewport'
)
.block.with-sub-blocks
.project-reference.sub-block
.sidebar-collapsed-icon.dont-change-state
=
clipboard_button
(
text:
project_ref
,
title:
_
(
'Copy reference'
),
placement:
"left"
,
boundary:
'viewport'
)
.cross-project-reference.hide-collapsed
%span
=
_
(
'Reference:'
)
%cite
{
title:
project_ref
}
=
project_ref
=
clipboard_button
(
text:
project_ref
,
title:
_
(
'Copy reference'
),
placement:
"left"
,
boundary:
'viewport'
)
-
if
issuable_type
==
'merge_request'
.sidebar-source-branch.sub-block
.sidebar-collapsed-icon.dont-change-state
=
clipboard_button
(
text:
source_branch
,
title:
_
(
'Copy branch name'
),
placement:
"left"
,
boundary:
'viewport'
)
.sidebar-mr-source-branch.hide-collapsed
%span
=
_
(
'Source branch: %{source_branch_open}${source_branch}%{source_branch_close}'
).
html_safe
%
{
source_branch_open:
"<cite class='ref-name' title='
#{
source_branch
}
'>"
.
html_safe
,
source_branch_close:
"</cite>"
.
html_safe
,
source_branch:
source_branch
}
=
clipboard_button
(
text:
source_branch
,
title:
_
(
'Copy branch name'
),
placement:
"left"
,
boundary:
'viewport'
)
-
if
issuable_sidebar
.
dig
(
:current_user
,
:can_move
)
.block.js-sidebar-move-issue-block
...
...
changelogs/unreleased/23767-add-branch-to-mr-sidebar.yml
0 → 100644
View file @
6f68cace
---
title
:
Display Merge Request's source branch name in sidebar
merge_request
:
34901
author
:
Ethan Reesor (@firelizzard)
type
:
added
locale/gitlab.pot
View file @
6f68cace
...
...
@@ -23323,6 +23323,9 @@ msgstr ""
msgid "Source (branch or tag)"
msgstr ""
msgid "Source branch: %{source_branch_open}${source_branch}%{source_branch_close}"
msgstr ""
msgid "Source code"
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment