summaryrefslogtreecommitdiff
path: root/lib/api
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | |
* | | Fix testsCamil Staps2019-08-071-1/+1
| | |
* | | Expose time since starring on project/:id/starrers API endpoint; exclude ↵Camil Staps2019-08-072-4/+8
| | | | | | | | | | | | private profiles here as well
* | | Fix API endpoint for starred projects of a user; add info about starred ↵Camil Staps2019-08-071-1/+1
| | | | | | | | | | | | projects on profile to documentation
* | | Add documentation and changelog for !24690Camil Staps2019-08-071-4/+6
| | |
* | | Add users/:user_id/starred_projects API endpoint for projects starred by a userCamil Staps2019-08-071-0/+16
| | |
* | | Add projects/:id/starrers API endpoint for users who starred a repositoryCamil Staps2019-08-071-0/+12
| |/ |/|
* | Add group level container repository endpointsSteve Abrams2019-08-054-14/+59
| | | | | | | | | | | | | | API endpoints for requesting container repositories and container repositories with their tag information are enabled for users that want to specify the group containing the repository rather than the specific project.
* | Add backwards compatibility for legacy settingGeorge Koltsov2019-08-022-0/+8
|/ | | | | `allow_local_requests_for_hooks_and_services` was renamed to `allow_local_requests_for_web_hooks_and_services`.
* Use NotesFinder in IssuableActions modulePatrick Derichs2019-08-011-1/+1
| | | | | | | | | | Remove project from NotesFinder constructor Add project parameter to specs Also look for methods in private scope Fix specs to match new NotesFinder constructor
* Add support page link in help menuDiego Louzán2019-07-301-1/+1
| | | | Creates a new item in help dropdown to show configured support page link
* Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqRobert Speicher2019-07-291-21/+0
|\
| * Merge branch 'security-remove-take-trigger-ownership-feature' into 'master'GitLab Release Tools Bot2019-07-261-21/+0
| |\ | | | | | | | | | | | | | | | | | | Drop feature to take ownership of a trigger token Closes #2868 See merge request gitlab/gitlabhq!3198
| | * Drop feature to take ownership of a trigger tokenFabio Pitino2019-07-101-21/+0
| | | | | | | | | | | | | | | | | | | | | Removing API and frontend interactions that allowed users to take ownership of a trigger token. Removed mentions from the documentation.
* | | Merge branch 'ce-port-4550-add-project-download-export-audit-event' into ↵Stan Hu2019-07-292-1/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'master' CE: Add project download & project export audit event See merge request gitlab-org/gitlab-ce!31103
| * | | CE: Add project download & project export audit eventce-port-4550-add-project-download-export-audit-eventmanojmj2019-07-262-1/+5
| |/ / | | | | | | | | | | | | | | | This change adds audit events for download of repository and export of project.
* | | Merge branch 'add-git-blame-api' into 'master'Nick Thomas2019-07-292-0/+38
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Expose git blame in api Closes #51345 See merge request gitlab-org/gitlab-ce!30675
| * | | Add git blame apiOleg Zubchenko2019-07-262-0/+38
| | | |
* | | | Merge branch 'remove-nested-groups-checks' into 'master'Lin Jen-Shin2019-07-262-8/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove code related to object hierarchy and MySQL Closes #65056 and #65055 See merge request gitlab-org/gitlab-ce!31095
| * | | | Remove code related to object hierarchy in MySQLremove-nested-groups-checksHeinrich Lee Yu2019-07-252-8/+2
| | |/ / | |/| | | | | | | | | | | | | | These are not required because MySQL is not supported anymore
* | | | Merge branch 'mc/feature/find-all-artifacts-for-sha' into 'master'Robert Speicher2019-07-261-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Find build by sha from ref Closes #64534 and #45697 See merge request gitlab-org/gitlab-ce!30843
| * | | | Rename latest_successful to be more explicitMatija Čupić2019-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Reword Project#latest_successful_build_for to Project#latest_successful_build_for_ref * Reword Ci::Pipeline#latest_successful_for to Ci::Pipeline#latest_successful_build_for_ref
* | | | | Prefer `flat_map` over `map` + `flatten`Peter Leitzen2019-07-261-1/+1
| |/ / / |/| | | | | | | | | | | | | | | Convert several occurrences of `map` + `flatten` to `flat_map` where applicable.
* | | | Remove dead MySQL codeNick Thomas2019-07-231-9/+2
|/ / / | | | | | | | | | None of this code can be reached any more, so it can all be removed
* | | Merge branch 'gsemet/gitlab-ce-gsemet-master-patch-33258' into 'master'Sean McGivern2019-07-231-1/+3
|\ \ \ | | | | | | | | | | | | | | | | Multiple pipeline support for Build status See merge request gitlab-org/gitlab-ce!30828
| * | | Add specs for specifying pipeline behaviorMatija Čupić2019-07-231-6/+3
| | | | | | | | | | | | | | | | | | | | Adds specs for testing the new behavior of specifying a pipeline when POSTing a status.
| * | | Multiple pipeline support for Build statusGaetan Semet2019-07-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows user to specify the pipeline ID when several pipelines has been triggered on the same branch and commit. Signed-off-by: Gaetan Semet <gaetan.semet@renault.com>
* | | | Merge branch 'ci_default_git_depth_only' into 'master'Douglas Barbosa Alexandre2019-07-181-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | API: Allow changing only ci_default_git_depth See merge request gitlab-org/gitlab-ce!30888
| * | | | API: Allow changing only ci_default_git_depthMathieu Parent2019-07-181-0/+1
| | | | |
* | | | | Merge branch 'webide-commit-use-correct-parent' into 'master'Nick Thomas2019-07-181-5/+9
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | Use correct parent when committing in WebIDE See merge request gitlab-org/gitlab-ce!29598
| * | | | Add start_sha to commits APIMarkus Koller2019-07-181-5/+9
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When passing start_branch on committing from the WebIDE, it's possible that the branch has changed since editing started, which results in the change being applied on top of the latest commit in the branch and overwriting the new changes. By passing the start_sha instead we can make sure that the change is applied on top of the commit which the user started editing from.