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
adec7a90
Commit
adec7a90
authored
May 07, 2020
by
syasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename include_confidential to include_nonpublished
parent
9955183f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
ee/app/finders/status_page/incidents_finder.rb
ee/app/finders/status_page/incidents_finder.rb
+6
-6
ee/spec/finders/status_page/incidents_finder_spec.rb
ee/spec/finders/status_page/incidents_finder_spec.rb
+2
-2
No files found.
ee/app/finders/status_page/incidents_finder.rb
View file @
adec7a90
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# # A single issue which includes confidential issues by default)
# # A single issue which includes confidential issues by default)
# issue = finder.find_by_id(issue_id)
# issue = finder.find_by_id(issue_id)
# # Find a "public only" issue
# # Find a "public only" issue
# issue = finder.find_by_id(issue_id, include_
confidential
: false)
# issue = finder.find_by_id(issue_id, include_
nonpublished
: false)
#
#
# # Most recent 20 non-confidential issues
# # Most recent 20 non-confidential issues
# issues = finder.all
# issues = finder.all
...
@@ -26,8 +26,8 @@ module StatusPage
...
@@ -26,8 +26,8 @@ module StatusPage
@project_id
=
project_id
@project_id
=
project_id
end
end
def
find_by_id
(
issue_id
,
include_
confidential
:
true
)
def
find_by_id
(
issue_id
,
include_
nonpublished
:
true
)
execute
(
include_
confidential:
include_confidential
)
execute
(
include_
nonpublished:
include_nonpublished
)
.
find_by_id
(
issue_id
)
.
find_by_id
(
issue_id
)
end
end
...
@@ -40,9 +40,9 @@ module StatusPage
...
@@ -40,9 +40,9 @@ module StatusPage
attr_reader
:project_id
attr_reader
:project_id
def
execute
(
sorted:
false
,
include_
confidential
:
false
)
def
execute
(
sorted:
false
,
include_
nonpublished
:
false
)
issues
=
init_collection
issues
=
init_collection
issues
=
publi
c_only
(
issues
)
unless
include_confidential
issues
=
publi
shed_only
(
issues
)
unless
include_nonpublished
issues
=
by_project
(
issues
)
issues
=
by_project
(
issues
)
issues
=
reverse_chronological
(
issues
)
if
sorted
issues
=
reverse_chronological
(
issues
)
if
sorted
issues
issues
...
@@ -52,7 +52,7 @@ module StatusPage
...
@@ -52,7 +52,7 @@ module StatusPage
Issue
Issue
end
end
def
publi
c
_only
(
issues
)
def
publi
shed
_only
(
issues
)
issues
.
public_only
issues
.
public_only
end
end
...
...
ee/spec/finders/status_page/incidents_finder_spec.rb
View file @
adec7a90
...
@@ -41,8 +41,8 @@ describe StatusPage::IncidentsFinder do
...
@@ -41,8 +41,8 @@ describe StatusPage::IncidentsFinder do
end
end
end
end
context
'with include_
confidential
'
do
context
'with include_
nonpublished
'
do
let
(
:params
)
{
{
include_
confidential
:
false
}
}
let
(
:params
)
{
{
include_
nonpublished
:
false
}
}
context
'for confidential issue'
do
context
'for confidential issue'
do
let
(
:issue
)
{
issues
.
fetch
(
:confidential
)
}
let
(
:issue
)
{
issues
.
fetch
(
:confidential
)
}
...
...
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