summaryrefslogtreecommitdiff
path: root/lib/api
Commit message (Collapse)AuthorAgeFilesLines
* Add port section to CI Image objectFrancisco Javier López2019-04-031-0/+5
| | | | | | | | | | | In order to implement https://gitlab.com/gitlab-org/gitlab-ee/issues/10179 we need several modifications on the CI config file. We are adding a new ports section in the default Image object. Each of these ports will accept: number, protocol and name. By default this new configuration will be only enabled in the Web IDE config file.
* Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ↵jarv/dev-to-gitlab-2019-04-02John Jarvis2019-04-021-5/+3
|\ | | | | | | jarv/dev-to-gitlab-2019-04-02
| * Merge branch 'security-id-potential-denial-languages' into 'master'GitLab Release Tools Bot2019-04-021-5/+3
| |\ | | | | | | | | | | | | Return cached languages if they've been detected before See merge request gitlab/gitlabhq!2998
| | * Return cached languages if they've been detected beforeIgor Drozdov2019-03-201-5/+3
| | |
* | | Include cluster domain into Project Cluster APIMayra Cabrera2019-04-012-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Domain was introduced on 11.8 and was not included on the Project Cluster API. With this change user will be able to include domain when adding and updating a cluster. Domain will also be included on the GET calls. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59441
* | | Fix API /project/:id/branches not returning correct merge statusStan Hu2019-03-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24034 introduced a regression where only the first 20 branches were used to determine whether a branch has been merged because the pagination was applied incorrectly. Requesting the second page of branches via the API would always have the wrong merge status. We fix this by properly paginating the branches before requesting their merge status. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56250
* | | Merge branch 'osw-multi-line-suggestions-creation-strategy' into 'master'Andreas Brandl2019-03-271-2/+0
|\ \ \ | | | | | | | | | | | | | | | | Prepares suggestion implementation for multi-line support See merge request gitlab-org/gitlab-ce!26057
| * | | Prepare suggestion implementation for multi-lineOswaldo Ferreira2019-03-271-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Adds the groundwork needed in order to persist multi-line suggestions, while providing the parsing strategy which will be reused for the **Preview** as well.
* | | | Resolve "Get milestone by title via API"Fabio Busatto2019-03-272-0/+8
| | | |
* | | | Merge branch 'bvl-allow-more-repos-per-resource-ce' into 'master'James Lopez2019-03-272-8/+10
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Allow multiple repositories per project See merge request gitlab-org/gitlab-ce!26539
| * | | Allow multiple repositories per projectBob Van Landuyt2019-03-262-8/+10
| |/ / | | | | | | | | | | | | | | | | | | | | | This changes the repository type from a binary `wiki?` to a type. So we can have more than 2 repository types. Now everywhere we called `.wiki?` and expected a boolean, we check that type.
* | | Merge branch 'backport-api-parameters' into 'master'Robert Speicher2019-03-269-48/+183
|\ \ \ | | | | | | | | | | | | | | | | Backport EE API parameters in lib/api See merge request gitlab-org/gitlab-ce!26369
| * | | Backport parameters for API::ParametersYorick Peterse2019-03-261-0/+8
| | | | | | | | | | | | | | | | | | | | This backports the EE specific parameters for API::Parameters, wrapping them in a conditional.
| * | | Backport parameters for API::UsersYorick Peterse2019-03-261-0/+8
| | | | | | | | | | | | | | | | | | | | This backports the EE specific parameters for API::Users, and wraps them in a conditional.
| * | | Backport API parameters for API::SettingsYorick Peterse2019-03-261-0/+36
| | | | | | | | | | | | | | | | | | | | This backports the API parameters from API::Settings that were added in EE, wrapping them in a conditional.
| * | | Backport changes to API::ProtectedBranchesYorick Peterse2019-03-261-0/+24
| | | | | | | | | | | | | | | | | | | | This backports EE specific parameters EE adds to API::ProtectedBranches, and wraps them in a conditional.
| * | | Backport parameters from API::ProjectsYorick Peterse2019-03-262-35/+44
| | | | | | | | | | | | | | | | | | | | This backports various parameter changes EE makes to API::Projects, along with moving some code around to make it easier to extend in EE.
| * | | Backport API::Issues parameters from EEYorick Peterse2019-03-262-13/+37
| | | | | | | | | | | | | | | | | | | | This backports the parameters that EE adds to API::Issues, and wraps them in conditionals so they are only used in EE.
| * | | Backport API::Helpers::ProjectsHelpers from EEYorick Peterse2019-03-261-0/+11
| | | | | | | | | | | | | | | | | | | | This backports all changes made to this module in EE to CE, and wraps EE specific code in a conditional.
| * | | Backport EE API parameters for API::GroupsYorick Peterse2019-03-261-0/+15
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This backports the API parameters for API::Groups from EE to CE, ensuring both implementations use the same code. EE specific parameters are wrapped in an `if` statement for two reasons: 1. It allows us to completely disable the parameters in CE. 2. It removes the need for adding a source comment to signal that the parameters are EE only.
* | | Show statistics also when repository is disabledPeter Marko2019-03-231-1/+1
|/ /
* | Add highest_role method to UserThiago Presa2019-03-222-1/+5
| |
* | Apply suggestion to lib/api/search.rbAlexis Reigel2019-03-151-1/+1
| |
* | un-dry the search api scopeAlexis Reigel2019-03-141-12/+12
| | | | | | | | due to the usage in EE this attempt to more DRYness is not worth it.
* | return 400 on users search and feature is disabledAlexis Reigel2019-03-141-8/+11
| | | | | | | | | | | | as the params block is evaluated when loading the class and the db connection is not available yet we can't use the feature toggle inside that block.
* | add feature flag for users searchAlexis Reigel2019-03-141-1/+8
| |
* | extract helper for search scope api paramAlexis Reigel2019-03-141-12/+12
| |
* | add users search to search apiAlexis Reigel2019-03-142-4/+5
|/
* Run rubocop -aNick Thomas2019-03-132-20/+14
|
* Merge branch 'resolve-lib-differences' into 'master'Robert Speicher2019-03-1215-717/+842
|\ | | | | | | | | Resolve CE to EE differences in the lib/api directory See merge request gitlab-org/gitlab-ce!25430
| * Add method to API::Variables for filtering paramsYorick Peterse2019-03-041-0/+10
| | | | | | | | | | This allows EE to customize the parameters used in two places, without having to modify the source code directly.
| * Update Triggers documentation per EEYorick Peterse2019-03-041-1/+1
| | | | | | | | | | This backports a line from EE so that both the CE and EE code are identical.
| * Refactor API::Settings for EEYorick Peterse2019-03-041-0/+7
| | | | | | | | | | This refactors API::Settings so that EE can more easily extend its behaviour, without having to modify the CE source code directly.
| * Move API::Services constants to a helperYorick Peterse2019-03-042-695/+724
| | | | | | | | | | | | | | This moves various constants previously defined in API::Services to the API::Helpers::ServicesHelpers module, using class methods instead of constants. This allows EE to extend the returned values, without having to modify the CE source code directly.
| * Refactor API::Search for EEYorick Peterse2019-03-042-9/+38
| | | | | | | | | | This refactors API::Search so that Enterprise Edition can more easily extend its functionality, without having to modify the file directly.
| * Move eventable types constant to a helperYorick Peterse2019-03-042-3/+14
| | | | | | | | | | | | This moves API::ResourceLabelEventsHelpers::EVENTABLE_TYPES to a class method in a separate helper module, allowing EE to redefine it without having to directly modify the source code.
| * Move LFS HTTP URL to a separate methodYorick Peterse2019-03-041-1/+9
| | | | | | | | | | | | This adds a method to API::Internal that returns the URL to use for LFS authentication tokens. This makes it possible for EE to redefine this behaviour, without having to directly modify the source code.
| * Use a method for updating groups in the APIYorick Peterse2019-03-041-1/+9
| | | | | | | | | | | | Similar to creating groups in the groups API, EE injects custom code just before we update an existing group. Moving the update logic to a separate method in CE allows EE to more easily extend it.
| * Use a method for creating groups in the APIYorick Peterse2019-03-041-1/+9
| | | | | | | | | | | | | | EE has some custom behaviour that needs to run before and after creating a group in the API. By moving the group creation logic to a separate method, EE can easily extend this behaviour; without having to directly modify the API source code.
| * Refactor API noteable types constantsYorick Peterse2019-03-044-6/+21
| | | | | | | | | | | | | | | | | | This replaces API::Notes::NOTEABLE_TYPES and API::Discussions::NOTEABLE_TYPES with class methods defined in a separate helper modules. This allows EE to extend the list of noteable types, without having to modify the constant in-place. We can't define these methods directly in the API classes, as they would be used before we're able to extend them in EE.
* | Remove fake repository_path responseFabio Papa2019-03-121-5/+0
| | | | | | | | | | | | The repository_path is no longer needed since https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/231, which closes https://gitlab.com/gitlab-org/gitlab-shell/issues/135.
* | Authenticate the internal API using a headerBob Van Landuyt2019-03-111-4/+7
| | | | | | | | | | Instead of mixing in the shared secret into the querystring or body, we could also specify it in a header.
* | Provide EE backports for filtering by approver featureIgor2019-03-072-0/+18
| | | | | | | | | | Adds custom validator for ArrayNoneAny param Extracts some logic in js into separate files
* | Revert "Merge branch 'id-1951-filter-merge-requests-by-approvers' into 'master'"Igor2019-03-072-18/+0
| | | | | | | | This reverts merge request !24982
* | Merge branch 'sh-optimize-todos-api' into 'master'Sean McGivern2019-03-074-4/+35
|\ \ | | | | | | | | | | | | | | | | | | Significantly reduce N+1 queries in /api/v4/todos endpoint Closes #40378 See merge request gitlab-org/gitlab-ce!25711
| * | Significantly reduce N+1 queries in /api/v4/todos endpointStan Hu2019-03-064-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By preloading associations and batching issuable metadata lookups, we can significantly cut the number of SQL queries needed to load the Todos API endpoint. On GitLab.com, my own tests showed my user's SQL queries went from 365 to under 60 SQL queries. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/40378
* | | Provide EE backports for filtering by approver featureIgor2019-03-072-0/+18
| | | | | | | | | | | | | | | Adds custom validator for ArrayNoneAny param Extracts some logic in js into separate files
* | | Merge branch '41888-access-personal-snippets-by-api' into 'master'Robert Speicher2019-03-061-13/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Allow all snippets to be accessed by API Closes #41888 See merge request gitlab-org/gitlab-ce!25772
| * | | Allow all personal snippets to be accessed by APINick Thomas2019-03-061-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | Previously, you could only access personal snippets in the API if you had authored them. The documentation doesn't state that this is the case, and it's quite surprising.
* | | | Adds the Rubocop ReturnNil copAndrew Newdigate2019-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | This style change enforces `return if ...` instead of `return nil if ...` to save maintainers a few minor review points