diff options
author | Rémy Coutable <remy@rymai.me> | 2018-07-01 12:25:01 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-07-01 12:25:01 +0300 |
commit | 3cf683629e62fa4810512b20f4f54140591829ef (patch) | |
tree | d0a65c34ee26e3fbb98a533d614092b51a4bf7e5 /app | |
parent | 61c17b253e6560bef377f57d39e7fb99c4659b84 (diff) | |
parent | c2b622b2a40bdf01f3f71a8adf9aff31d535149f (diff) |
Merge branch 'ccr/add_locked_state' into 'master'
Add locked state to merge request API
See merge request gitlab-org/gitlab-ce!20186
Diffstat (limited to 'app')
-rw-r--r-- | app/finders/issuable_finder.rb | 4 | ||||
-rw-r--r-- | app/finders/merge_requests_finder.rb | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index 5d5f72c4d86..6fdfd964fca 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -7,7 +7,7 @@ # current_user - which user use # params: # scope: 'created_by_me' or 'assigned_to_me' or 'all' -# state: 'opened' or 'closed' or 'all' +# state: 'opened' or 'closed' or 'locked' or 'all' # group_id: integer # project_id: integer # milestone_title: string @@ -311,6 +311,8 @@ class IssuableFinder items.respond_to?(:merged) ? items.merged : items.closed when 'opened' items.opened + when 'locked' + items.where(state: 'locked') else items end diff --git a/app/finders/merge_requests_finder.rb b/app/finders/merge_requests_finder.rb index 8d84ed4bdfb..40089c082c1 100644 --- a/app/finders/merge_requests_finder.rb +++ b/app/finders/merge_requests_finder.rb @@ -6,7 +6,7 @@ # current_user - which user use # params: # scope: 'created_by_me' or 'assigned_to_me' or 'all' -# state: 'open', 'closed', 'merged', or 'all' +# state: 'open', 'closed', 'merged', 'locked', or 'all' # group_id: integer # project_id: integer # milestone_title: string |