BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1cf35c3d
Commit
1cf35c3d
authored
Oct 22, 2017
by
George Andrinopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add case insensitive branches search
parent
cc8af554
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
branches_finder.rb
app/finders/branches_finder.rb
+1
-1
35199-case-insensitive-branches-search.yml
...ogs/unreleased/35199-case-insensitive-branches-search.yml
+5
-0
branches_finder_spec.rb
spec/finders/branches_finder_spec.rb
+9
-0
No files found.
app/finders/branches_finder.rb
View file @
1cf35c3d
...
...
@@ -23,7 +23,7 @@ class BranchesFinder
def
filter_by_name
(
branches
)
if
search
branches
.
select
{
|
branch
|
branch
.
name
.
include?
(
search
)
}
branches
.
select
{
|
branch
|
branch
.
name
.
upcase
.
include?
(
search
.
upcase
)
}
else
branches
end
...
...
changelogs/unreleased/35199-case-insensitive-branches-search.yml
0 → 100644
View file @
1cf35c3d
---
title
:
Case insensitive search for branches
merge_request
:
14995
author
:
George Andrinopoulos
type
:
fixed
spec/finders/branches_finder_spec.rb
View file @
1cf35c3d
...
...
@@ -46,6 +46,15 @@ describe BranchesFinder do
expect
(
result
.
count
).
to
eq
(
1
)
end
it
'filters branches by name ignoring letter case'
do
branches_finder
=
described_class
.
new
(
repository
,
{
search:
'FiX'
})
result
=
branches_finder
.
execute
expect
(
result
.
first
.
name
).
to
eq
(
'fix'
)
expect
(
result
.
count
).
to
eq
(
1
)
end
it
'does not find any branch with that name'
do
branches_finder
=
described_class
.
new
(
repository
,
{
search:
'random'
})
...
...
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