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
fe1d7438
Commit
fe1d7438
authored
Feb 05, 2022
by
David Rotert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a clipboard button to the "Branches" page in "Repository"
Changelog: added
parent
aae69522
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
app/views/projects/branches/_branch.html.haml
app/views/projects/branches/_branch.html.haml
+1
-0
spec/features/projects/branches_spec.rb
spec/features/projects/branches_spec.rb
+2
-0
No files found.
app/views/projects/branches/_branch.html.haml
View file @
fe1d7438
...
...
@@ -7,6 +7,7 @@
=
sprite_icon
(
'branch'
,
size:
12
,
css_class:
'gl-flex-shrink-0'
)
=
link_to
project_tree_path
(
@project
,
branch
.
name
),
class:
'item-title str-truncated-100 ref-name gl-ml-3 qa-branch-name'
do
=
branch
.
name
=
clipboard_button
(
text:
branch
.
name
,
title:
_
(
"Copy branch name"
))
-
if
branch
.
name
==
@repository
.
root_ref
=
gl_badge_tag
s_
(
'DefaultBranchLabel|default'
),
{
variant: :info
,
size: :sm
},
{
class:
'gl-ml-2'
}
-
elsif
merged
...
...
spec/features/projects/branches_spec.rb
View file @
fe1d7438
...
...
@@ -36,6 +36,8 @@ RSpec.describe 'Branches' do
expect
(
page
).
to
have_content
(
sorted_branches
(
repository
,
count:
5
,
sort_by: :updated_desc
,
state:
'active'
))
expect
(
page
).
to
have_content
(
sorted_branches
(
repository
,
count:
4
,
sort_by: :updated_asc
,
state:
'stale'
))
expect
(
page
).
to
have_button
(
'Copy branch name'
)
expect
(
page
).
to
have_link
(
'Show more active branches'
,
href:
project_branches_filtered_path
(
project
,
state:
'active'
))
expect
(
page
).
not_to
have_content
(
'Show more stale branches'
)
end
...
...
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