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
22c845cf
Commit
22c845cf
authored
Feb 23, 2021
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use info colour for merged search results instead of primary
parent
8e5c5787
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
app/helpers/search_helper.rb
app/helpers/search_helper.rb
+1
-1
changelogs/unreleased/284392-use-info-style-for-merged-instead-of-primary.yml
...d/284392-use-info-style-for-merged-instead-of-primary.yml
+5
-0
spec/helpers/search_helper_spec.rb
spec/helpers/search_helper_spec.rb
+1
-1
No files found.
app/helpers/search_helper.rb
View file @
22c845cf
...
@@ -406,7 +406,7 @@ module SearchHelper
...
@@ -406,7 +406,7 @@ module SearchHelper
# Closed is considered "danger" for MR so we need to handle separately
# Closed is considered "danger" for MR so we need to handle separately
if
issuable
.
is_a?
(
::
MergeRequest
)
if
issuable
.
is_a?
(
::
MergeRequest
)
if
issuable
.
merged?
if
issuable
.
merged?
:
primary
:
info
elsif
issuable
.
closed?
elsif
issuable
.
closed?
:danger
:danger
else
else
...
...
changelogs/unreleased/284392-use-info-style-for-merged-instead-of-primary.yml
0 → 100644
View file @
22c845cf
---
title
:
Use info colour for merged search results instead of primary
merge_request
:
55008
author
:
type
:
changed
spec/helpers/search_helper_spec.rb
View file @
22c845cf
...
@@ -580,7 +580,7 @@ RSpec.describe SearchHelper do
...
@@ -580,7 +580,7 @@ RSpec.describe SearchHelper do
describe
'#issuable_state_to_badge_class'
do
describe
'#issuable_state_to_badge_class'
do
context
'with merge request'
do
context
'with merge request'
do
it
'returns correct badge based on status'
do
it
'returns correct badge based on status'
do
expect
(
issuable_state_to_badge_class
(
build
(
:merge_request
,
:merged
))).
to
eq
(
:
primary
)
expect
(
issuable_state_to_badge_class
(
build
(
:merge_request
,
:merged
))).
to
eq
(
:
info
)
expect
(
issuable_state_to_badge_class
(
build
(
:merge_request
,
:closed
))).
to
eq
(
:danger
)
expect
(
issuable_state_to_badge_class
(
build
(
:merge_request
,
:closed
))).
to
eq
(
:danger
)
expect
(
issuable_state_to_badge_class
(
build
(
:merge_request
,
:opened
))).
to
eq
(
:success
)
expect
(
issuable_state_to_badge_class
(
build
(
:merge_request
,
:opened
))).
to
eq
(
:success
)
end
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