summaryrefslogtreecommitdiff
path: root/lib/api
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '66464-typo-in-release_endpoint_requiremets-constant' into 'master'Michael Kozono2019-09-032-6/+6
|\ | | | | | | | | | | | | Resolve "Typo in RELEASE_ENDPOINT_REQUIREMETS constant" Closes #66464 See merge request gitlab-org/gitlab-ce!32468
| * Correct typo in constant66464-typo-in-release_endpoint_requiremets-constantSean Carroll2019-09-022-6/+6
| |
* | Added relationships between Release and MilestoneEtienne Baqué2019-09-032-0/+3
|/ | | | | | Modified schema via migrations. Added one-to-one relationship between the two models. Added changelog file
* Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqRobert Speicher2019-08-296-6/+40
|\
| * Merge branch 'security-enable-image-proxy' into 'master'GitLab Release Tools Bot2019-08-293-1/+30
| |\ | | | | | | | | | | | | | | | | | | Use image proxy to mitigate stealing ip addresses Closes #2812 See merge request gitlab/gitlabhq!2926
| | * Add support for using a Camo proxy serverBrett Walker2019-08-233-1/+30
| | | | | | | | | | | | | | | | | | User images and videos will get proxied through the Camo server in order to keep malicious sites from collecting the IP address of users.
| * | Merge branch 'security-epic-notes-api-reveals-historical-info-ce-master' ↵GitLab Release Tools Bot2019-08-293-5/+5
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Filter out old system notes for epics in notes api endpoint response See merge request gitlab/gitlabhq!3224
| | * | Filter out old system notes for epicsPatrick Derichs2019-08-283-5/+5
| | |/
| * | Merge branch 'security-59549-add-capcha-for-failed-logins' into 'master'GitLab Release Tools Bot2019-08-291-0/+5
| |\ \ | | |/ | |/| | | | | | | Require a captcha after unique failed logins from the same IP See merge request gitlab/gitlabhq!3270
| | * Add captcha if there are multiple failed login attemptsMałgorzata Ksionek2019-07-311-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add method to store session ids by ip Add new specs for storing session ids Add cleaning up records after login Add retrieving anonymous sessions Add login recaptcha setting Add new setting to sessions controller Add conditions for showing captcha Add sessions controller specs Add admin settings specs for login protection Add new settings to api Add stub to devise spec Add new translation key Add cr remarks Rename class call Add cr remarks Change if-clause for consistency Add cr remarks Add code review remarks Refactor AnonymousSession class Add changelog entry Move AnonymousSession class to lib Move store unauthenticated sessions to sessions controller Move link to recaptcha info Regenerate text file Improve copy on the spam page Change action filter for storing anonymous sessions Fix rubocop offences Add code review remarks
* | | Merge branch 'sh-support-content-for-snippets-api' into 'master'Kamil Trzciński2019-08-291-5/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Standardize use of `content` parameter in snippets API Closes #66673 See merge request gitlab-org/gitlab-ce!32296
| * | | Standardize use of `content` parameter in snippets APIsh-support-content-for-snippets-apiStan Hu2019-08-281-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was some confusion over whether `code` or `content` is the right parameter for snippets. Internally, the database stores `content`. However: 1. Project snippets use `code`. `code` gets remapped in `content` in `lib/api/project_snippets.rb`. 2. Personal snippets use `content`. To unify these APIs, allow an alias of `content` to work for project snippets. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66673
* | | | Simplify internal post receive messagesmk/simplify-internal-post-receive-messagesMichael Kozono2019-08-283-17/+26
|/ / / | | | | | | | | | | | | | | | | | | | | | Instead of sending varied data to Gitaly, and making Gitaly construct various messages, build the messages first and have Gitaly print either basic messages or alert messages, in the order they come. Depends on https://gitlab.com/gitlab-org/gitaly/merge_requests/1410
* | | Update CE files for GSD projects filterVictor Zagorodny2019-08-283-11/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | A new param with_security_reports was added to GET /groups/:id/projects API and the code to support this logic in GroupProjectsFinder and Project model. Also, a DB index was added to ci_job_artifacts table to speed up the search of security reports artifacts for projects
* | | Replace prepend_entity with prepend_if_eeWinnie Hellmann2019-08-271-0/+18
| | | | | | | | | | | | (cherry picked from commit 897a9d308db46b620b738b98f2b0e5630ac7d2dd)
* | | Merge branch '57657-promote-label-to-group-label-via-api-endpoint' into 'master'Sean McGivern2019-08-271-0/+25
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Promote Label to Group Label via API endpoint Closes #57657 See merge request gitlab-org/gitlab-ce!25218
| * | | Update docs targeting 12.3Robert Schilling2019-08-261-1/+1
| | | |
| * | | Move promote to put and add more specsRobert Schilling2019-08-261-1/+1
| | | |
| * | | Add docs and first specsRobert Schilling2019-08-261-3/+3
| | | |
| * | | API: Promote project labels to group labelsRobert Schilling2019-08-261-0/+25
| |/ /
* | | Merge branch 'sh-fix-nplusone-issues' into 'master'Mayra Cabrera2019-08-261-1/+2
|\ \ \ | |/ / |/| | | | | | | | Fix N+1 Gitaly calls in /api/v4/projects/:id/issues See merge request gitlab-org/gitlab-ce!32171
| * | Fix N+1 Gitaly calls in /api/v4/projects/:id/issuessh-fix-nplusone-issuesStan Hu2019-08-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31938. In GitLab 9.0, https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9661 removed the `subscribed` flag from the API when the user requested a list of issues or merge requests since calculating this value triggers extensive Markdown processing. In GitLab 12.0 via a4fbf39e, we accidentally reintroduced this performance regression by changing `IssueBasic` to `Issue` in `entities.rb`. This showed up as a Gitaly N+1 issue since the Markdown processing would attempt to extract a commit if it detected a regex that matched a commit. We restore the prior behavior by once again removing the `subscribed` flag for the bulk list of issues and merge requests and add a test to ensure they aren't reintroduced. Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/66202
* | | Read pipelines from public projects though APIMarius Bobin2019-08-231-1/+2
|/ / | | | | | | | | Allow users to read pipelines for public projects with public builds enabled without providing an access token.
* | Add label_id parameter to label API for PUT and DELETEPatrick Derichs2019-08-232-12/+28
| | | | | | | | Add specs for new parameter and updated documentation as well.
* | Merge branch 'sh-eliminate-gitaly-nplus-one-notes' into 'master'Kamil Trzciński2019-08-232-6/+9
|\ \ | | | | | | | | | | | | Eliminate Gitaly N+1 queries with notes API See merge request gitlab-org/gitlab-ce!32089
| * | Eliminate Gitaly N+1 queries with notes APIsh-eliminate-gitaly-nplus-one-notesStan Hu2019-08-222-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31834, we see that in https://gitlab.com/gitlab-org/gitlab-ce/issues/65957 there can be hundreds, even thousands, of Gitaly requests in the `/api/:version/projects/:id/merge_requests/:noteable_id/notes` endpoint. Previously, the API to retrieve notes generated hundreds of Gitaly calls to determine whether a system note should be shown to the user. It did this by: 1. Rendering the Markdown 2. Extracting cross-references from the Markdown 3. Issuing a Gitaly `FindCommit` RPC for every reference to validate that the commit exists. The last step is unnecessary because we don't need to display a commit if the user doesn't have access to the project in the first place. `RendersNotes#prepare_notes_for_rendering` is already used in `MergeRequestsController`, which is why we don't see N+1 Gitaly calls there. We use it here to optimize the note redaction process.
* | | Update sort options for issues list57402-upate-issues-list-sort-options-ceAlexandru Croitor2019-08-232-4/+7
|/ / | | | | | | | | | | | | | | | | | | Increase sort options for issues list from updated_at and create_at, to include more options close to what is required in actual issue list UI. This helps us to use REST API for issues list with sorting capabilities https://gitlab.com/gitlab-org/gitlab-ce/issues/57402
* | Merge branch ↵Kushal Pandya2019-08-221-0/+2
|\ \ | | | | | | | | | | | | | | | | | | 'ee-2502-refactor-ee-app-assets-javascripts-approvals-components-approvers_select-vue-to-remove-approverusers' into 'master' Add a new method to `Api.js`: `projectUsers` See merge request gitlab-org/gitlab-ce!31801
| * | Add a skip_users filter to the project users APINick Thomas2019-08-191-0/+2
| | | | | | | | | | | | | | | | | | This functionality is available in the /autocomplete users pseudo-API. We're attempting to replace that with the canonical API, so it needs support for this parameter too.
* | | Add service classes for mutating AwardEmojiLuke Duncalfe2019-08-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding, destroying and toggling emoji previously lacked services and instead were performed through methods called on Awardable models. This led to inconsistencies where relevant todos would be marked as done only when emoji were awarded through our controllers, but not through the API. Todos could also be marked as done when an emoji was being removed. Behaviour changes - Awarding emoji through the API will now mark a relevant Todo as done - Toggling an emoji off (destroying it) through our controllers will no longer mark a relevant Todo as done Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63372
* | | Standardize remote_ip and path keys for auth.log and api_json.logStan Hu2019-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Current `auth.log` uses `fullpath` and `ip`, while `api_json.log` uses `remote_ip` and `path` for the same fields. Let's standardize these namings to make it easier for people working with the data. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66167
* | | Fix Gitaly N+1 calls with listing issues/MRs via APIsh-fix-issues-api-gitaly-nplusoneStan Hu2019-08-172-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In GitLab 9.0, https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9661 removed the `subscribed` flag from the API when the user requested a list of issues or merge requests since calculating this value triggers extensive Markdown processing. In GitLab 12.0 via a4fbf39e, we accidentally reintroduced this performance regression by changing `IssueBasic` to `Issue` in `entities.rb`. This showed up as a Gitaly N+1 issue since the Markdown processing would attempt to extract a commit if it detected a regex that matched a commit. We restore the prior behavior by once again removing the `subscribed` flag for the bulk list of issues and merge requests and add a test to ensure they aren't reintroduced. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66202
* | | Merge branch 'fix/commits-api-empty-refname' into 'master'Nick Thomas2019-08-161-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | fix handling of empty ref_name parameter string in commits api Closes #64745 See merge request gitlab-org/gitlab-ce!31687
| * | | fix handling of empty ref_name parameter string in commits apiArmin Hohenegger2019-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when params[:ref_name] is set to "" by passing an empty query parameter to the api it is evaluated as false by the || operator. The use of active support core extensions presence method fixes the original implemantation. https://guides.rubyonrails.org/active_support_core_extensions.html#presence
* | | | Merge branch 'sh-fix-discussions-api-perf' into 'master'Douglas Barbosa Alexandre2019-08-151-10/+16
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate many Gitaly calls in discussions API Closes #65957 See merge request gitlab-org/gitlab-ce!31834
| * | | | Eliminate many Gitaly calls in discussions APIStan Hu2019-08-151-10/+16
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the API to retrieve discussions from merge requests often generated hundreds of Gitaly calls to determine whether a system note should be shown to the user. It did this by: 1. Rendering the Markdown 2. Extracting cross-references from the Markdown 3. For cross-references that were commits, a Gitaly FindCommit RPC would be issued to validate that the commit exists. The last step is unnecessary because we don't need to display a commit if the user doesn't have access to the project in the first place. `RendersNotes#prepare_notes_for_rendering` is already used in `MergeRequestsController`, which is why we don't see N+1 Gitaly calls there. We use it here to optimize the note redaction process. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65957
* | | | Merge branch 'fix-broken-ee-master-prepend-todos-api' into 'master'Stan Hu2019-08-151-0/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Adds EE prepend, which for some reason was missing See merge request gitlab-org/gitlab-ce!31851
| * | | | Adds EE prepend, which for some reason was missingfix-broken-ee-master-prepend-todos-apiAlex Kalderimis2019-08-151-0/+2
| |/ / /
* | | | Remove prepend_if_ee from CE codebaseLuke Duncalfe2019-08-151-2/+0
| | | | | | | | | | | | | | | | | | | | This was added in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31789
* | | | CE-specific changes to allow design Todos13494-todo-s-not-rendering-when-there-is-a-design-management-related-todo-ceLuke Duncalfe2019-08-151-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CE-specific changes for: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15129 Co-Authored-By: Alex Kalderimis <akalderimis@gitlab.com> Co-Authored-By: Luke Duncalfe <lduncalfe@eml.cc>
* | | | Migrates Snowplow backend from EE to CEJeremy Jackson2019-08-141-0/+6
|/ / / | | | | | | | | | | | | This introduces several changes, but these are all just ported from the EE project.
* | | Merge branch 'lib-differences' into 'master'Rémy Coutable2019-08-091-0/+1
|\ \ \ | |/ / |/| | | | | | | | Resolve EE differences in the lib/ directory See merge request gitlab-org/gitlab-ce!31582
| * | Backport EE changes to the project import APIYorick Peterse2019-08-081-0/+1
| | | | | | | | | | | | | | | | | | EE added a single line to this file that can easily be backported to CE, but it appears this was overlooked. The method called is a noop in CE, so no additional changes are necessary.
* | | Merge branch '39217-remove-kubernetes-service-integration' into 'master'James Lopez2019-08-091-27/+0
|\ \ \ | | | | | | | | | | | | | | | | Remove KubernetesService integration See merge request gitlab-org/gitlab-ce!31365
| * | | Final removal of KubernetesService39217-remove-kubernetes-service-integrationTiger2019-08-081-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | Creating new records has been disabled, and all existing records been migrated to clusters as of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/28534
* | | | Merge branch 'speed-up-labels-api' into 'master'Rémy Coutable2019-08-094-9/+19
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Remove label issue and MR counts from default API responses See merge request gitlab-org/gitlab-ce!31543
| * | | | Remove label issue and MR counts from default API responsesspeed-up-labels-apiSean McGivern2019-08-084-9/+19
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | These counts significantly increase the load time for these requests. Users can now opt in to receiving the counts by setting `with_counts=true` in requests. This is a breaking change, but hopefully a fairly minor one.
* | | | Bring scoped environment variables to coreHordur Freyr Yngvason2019-08-083-19/+3
| | | | | | | | | | | | | | | | As decided in https://gitlab.com/gitlab-org/gitlab-ce/issues/53593
* | | | Merge branch '12026-use-notes-finder-target-for-epics-ce' into 'master'Robert Speicher2019-08-081-3/+9
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | Use NotesFinder#target to find Epics See merge request gitlab-org/gitlab-ce!31408
| * | | Use NotesFinder#target to find Epics12026-use-notes-finder-target-for-epics-cePatrick Derichs2019-08-041-3/+9
| | | |