diff options
author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2019-02-04 18:06:17 +0300 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2019-02-04 18:06:17 +0300 |
commit | b421bd316fb2e79cbf82fdc21220e23a6f564311 (patch) | |
tree | 3ba0bc3c4c9a6a8cf210e485a80d927bd037494f /lib/api/projects.rb | |
parent | 6b0b14f81d6def6d74b303cd27fef6f98aaabfd0 (diff) |
Add programming language filtering to `/projects`
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 3afa2d8a6b0..6a93ef9f3ad 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -25,6 +25,9 @@ module API projects = projects.with_merge_requests_enabled if params[:with_merge_requests_enabled] projects = projects.with_statistics if params[:statistics] + lang = params[:with_programming_language] + projects = projects.with_programming_language(lang) if lang + projects end @@ -91,6 +94,7 @@ module API optional :membership, type: Boolean, default: false, desc: 'Limit by projects that the current user is a member of' optional :with_issues_enabled, type: Boolean, default: false, desc: 'Limit by enabled issues feature' optional :with_merge_requests_enabled, type: Boolean, default: false, desc: 'Limit by enabled merge requests feature' + optional :with_programming_language, type: String, desc: 'Limit to repositories which use the given programming language' optional :min_access_level, type: Integer, values: Gitlab::Access.all_values, desc: 'Limit by minimum access level of authenticated user' use :optional_filter_params_ee |