Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab
Commits
adec7a90
There was an error fetching the commit references. Please try again later.
Commit
adec7a90
authored
4 years ago
by
Sarah Yasonik
Browse files
Options
Downloads
Patches
Plain Diff
Rename include_confidential to include_nonpublished
parent
9955183f
No related branches found
No related tags found
2 merge requests
!32098
test merge conflicts for Release Tools
,
!31380
Rename AlertsFinder option include_confidential to include_nonpublished
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ee/app/finders/status_page/incidents_finder.rb
+6
-6
6 additions, 6 deletions
ee/app/finders/status_page/incidents_finder.rb
ee/spec/finders/status_page/incidents_finder_spec.rb
+2
-2
2 additions, 2 deletions
ee/spec/finders/status_page/incidents_finder_spec.rb
with
8 additions
and
8 deletions
ee/app/finders/status_page/incidents_finder.rb
+
6
−
6
View file @
adec7a90
...
...
@@ -13,7 +13,7 @@
# # A single issue which includes confidential issues by default)
# issue = finder.find_by_id(issue_id)
# # Find a "public only" issue
# issue = finder.find_by_id(issue_id, include_
c
on
fidential
: false)
# issue = finder.find_by_id(issue_id, include_
n
on
published
: false)
#
# # Most recent 20 non-confidential issues
# issues = finder.all
...
...
@@ -26,8 +26,8 @@ def initialize(project_id:)
@project_id
=
project_id
end
def
find_by_id
(
issue_id
,
include_
c
on
fidential
:
true
)
execute
(
include_
c
on
fidential
:
include_
c
on
fidential
)
def
find_by_id
(
issue_id
,
include_
n
on
published
:
true
)
execute
(
include_
n
on
published
:
include_
n
on
published
)
.
find_by_id
(
issue_id
)
end
...
...
@@ -40,9 +40,9 @@ def all
attr_reader
:project_id
def
execute
(
sorted:
false
,
include_
c
on
fidential
:
false
)
def
execute
(
sorted:
false
,
include_
n
on
published
:
false
)
issues
=
init_collection
issues
=
publi
c
_only
(
issues
)
unless
include_
c
on
fidential
issues
=
publi
shed
_only
(
issues
)
unless
include_
n
on
published
issues
=
by_project
(
issues
)
issues
=
reverse_chronological
(
issues
)
if
sorted
issues
...
...
@@ -52,7 +52,7 @@ def init_collection
Issue
end
def
publi
c
_only
(
issues
)
def
publi
shed
_only
(
issues
)
issues
.
public_only
end
...
...
This diff is collapsed.
Click to expand it.
ee/spec/finders/status_page/incidents_finder_spec.rb
+
2
−
2
View file @
adec7a90
...
...
@@ -41,8 +41,8 @@
end
end
context
'with include_
c
on
fidential
'
do
let
(
:params
)
{
{
include_
c
on
fidential
:
false
}
}
context
'with include_
n
on
published
'
do
let
(
:params
)
{
{
include_
n
on
published
:
false
}
}
context
'for confidential issue'
do
let
(
:issue
)
{
issues
.
fetch
(
:confidential
)
}
...
...
This diff is collapsed.
Click to expand it.
🤖 GitLab Bot 🤖
@gitlab-bot
mentioned in merge request
!31917 (merged)
·
4 years ago
mentioned in merge request
!31917 (merged)
mentioned in merge request !31917
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment