Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-18 17:02:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-18 17:02:45 +0300
commit80f61b4035607d7cd87de993b8f5e996bde3481f (patch)
tree06b12f51e97d87192e3dd0e05edf55143645b894 /app/finders
parent4ab54c2233e91f60a80e5b6fa2181e6899fdcc3e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/environments_finder.rb2
-rw-r--r--app/finders/todos_finder.rb7
2 files changed, 5 insertions, 4 deletions
diff --git a/app/finders/environments_finder.rb b/app/finders/environments_finder.rb
index 29c00e4b2c2..d4e803beb4e 100644
--- a/app/finders/environments_finder.rb
+++ b/app/finders/environments_finder.rb
@@ -51,7 +51,7 @@ class EnvironmentsFinder
# efficient way to get relevant environment entries.
# Currently, `#execute` method has a serious technical debt and
# we will likely rework on it in the future.
- # See more https://gitlab.com/gitlab-org/gitlab-ce/issues/63381
+ # See more https://gitlab.com/gitlab-org/gitlab-foss/issues/63381
def find
environments = project.environments
environments = by_name(environments)
diff --git a/app/finders/todos_finder.rb b/app/finders/todos_finder.rb
index ed6d20b9585..427fd3e7d85 100644
--- a/app/finders/todos_finder.rb
+++ b/app/finders/todos_finder.rb
@@ -47,11 +47,12 @@ class TodosFinder
sort(items)
end
- # Returns `true` if the current user has any todos for the given target.
+ # Returns `true` if the current user has any todos for the given target with the optional given state.
#
# target - The value of the `target_type` column, such as `Issue`.
- def any_for_target?(target)
- current_user.todos.any_for_target?(target)
+ # state - The value of the `state` column, such as `pending` or `done`.
+ def any_for_target?(target, state = nil)
+ current_user.todos.any_for_target?(target, state)
end
private