Commit Graph

606 Commits

Author SHA1 Message Date
Jarka Kadlecová 7381944565 Support search in API 2018-02-06 16:02:02 +01:00
Stan Hu 46a6edc731 Remove N+1 queries with /projects/:project_id/{access_requests,members} API endpoints
We can simplify the code quite a bit and improve performance by using
grape-entity merge fields:

https://github.com/ruby-grape/grape-entity/tree/v0.6.0#merge-fields

Relates to #42030
2018-01-30 21:46:09 -08:00
Oswaldo Ferreira 395e500f01 Remove tap and use simplified method call 2018-01-29 16:29:25 -02:00
Oswaldo Ferreira 2944896466 Return more consistent values for merge_status on MR API 2018-01-28 18:50:43 -02:00
Douwe Maan 1db2f22b15 Revert "Merge branch 'osw-updates-merge-status-on-api-actions' into 'master'"
This reverts merge request !16626
2018-01-25 11:12:14 +00:00
Douwe Maan 9f5390d81d Merge branch 'osw-updates-merge-status-on-api-actions' into 'master'
Return more consistent values for merge_status on V4 MR APIs

Closes #20639

See merge request gitlab-org/gitlab-ce!16626
2018-01-24 15:09:16 +00:00
Toon Claes 45b62dfd32 Make the exposing of the Application secret more explicit
To make it more clear to developers that the entity exposes the
application secret, define a separate entity that only should be used
when the secret is needed (probably only on creation).
2018-01-24 09:44:07 +01:00
Nicolas MERELLI 81bbcfacb0 Add application create API 2018-01-24 09:42:04 +01:00
Oswaldo Ferreira dc84313e73 Return more consistent values for merge_status on MR API 2018-01-23 19:08:24 -02:00
Douwe Maan 8e9c073a14 Merge branch 'feature/merge-request-system-hook' into 'master'
System hooks for Merge Requests

See merge request gitlab-org/gitlab-ce!14387
2018-01-18 11:37:16 +00:00
Douwe Maan 536a47b4b7 Merge branch 'sh-migrate-can-push-to-deploy-keys-projects-10-3' into 'security-10-3'
[10.3] Migrate `can_push` column from `keys` to `deploy_keys_project`

See merge request gitlab/gitlabhq!2276

(cherry picked from commit f6ca52d31bac350a23938e0aebf717c767b4710c)

1f2bd3c0 Backport to 10.3
2018-01-16 17:04:51 -08:00
Stan Hu 0424801ec8 Merge branch 'security-10-3-do-not-expose-passwords-or-tokens-in-service-integrations-api' into 'security-10-3'
Filter out sensitive fields from the project services API

See merge request gitlab/gitlabhq!2281

(cherry picked from commit 476f2576444632f2a9a61b4cead9c1077f2c81d7)

2bcbbda0 Filter out sensitive fields from the project services API
2018-01-16 17:04:38 -08:00
Douwe Maan 7acabf7c59 Merge branch 'remove-soft-removals' into 'master'
Remove soft removals related code

Closes #37447

See merge request gitlab-org/gitlab-ce!15789
2018-01-11 16:06:01 +00:00
Francisco Javier López f6c1d38259 Add option to disable commit stats to commit API 2018-01-09 11:36:12 +00:00
Yorick Peterse d0b8f536a1
Remove soft removals related code
This removes all usage of soft removals except for the "pending delete"
system implemented for projects. This in turn simplifies all the query
plans of the models that used soft removals. Since we don't really use
soft removals for anything useful there's no point in keeping it around.

This _does_ mean that hard removals of issues (which only admins can do
if I'm not mistaken) can influence the "iid" values, but that code is
broken to begin with. More on this (and how to fix it) can be found in
https://gitlab.com/gitlab-org/gitlab-ce/issues/31114.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37447
2018-01-08 17:04:45 +01:00
Dmitriy Zaporozhets 0788b37fba Merge branch 'api-domains-expose-project_id' into 'master'
Expose project_id on /api/v4/pages/domains

See merge request gitlab-org/gitlab-ce!16200
2018-01-05 14:29:37 +00:00
Sean McGivern 0f33ac6442 Merge branch 'backport-issue_3413' into 'master'
[EE-backport] Add group boards API endpoint

See merge request gitlab-org/gitlab-ce!16194
2018-01-05 14:17:19 +00:00
Alessio Caiazza 3514b7248c
Add status attribute to runner api entity 2018-01-05 11:10:28 +01:00
Felipe Artur 5e148d4e93 EE-BACKPORT group boards 2018-01-04 17:28:10 -02:00
Alexis Reigel 2a0a7b426e api support for merge_requests_events system hook 2018-01-04 09:33:41 +01:00
Luc Didry 78cdac8401 Expose project_id on /api/v4/pages/domains 2018-01-03 19:36:54 +01:00
Alessio Caiazza 5e0143a84b Add online attribute to runner api entity 2018-01-03 14:49:24 +01:00
Mark Fletcher 1e72dd106b Support new chat notifications parameters in Services API
+ Add support for the new separate channel and events settings
* Dry up chat notifications in the service properties definitions
2017-12-22 12:18:05 +00:00
Douwe Maan 8f29d2640f Merge branch 'rs-security-group-api' into 'security-10-2'
[10.2] Ensure we expose group projects using GroupProjectsFinder

See merge request gitlab/gitlabhq!2234

(cherry picked from commit 072f8f2fd6ec794645375a16ca4ddc1cbeb76d7a)

a2240338 Ensure we expose group projects using GroupProjectsFinder
2017-12-08 13:48:14 -08:00
Eric Eastwood e6ac6734c2 Use relative _path helper URLs in the GitLab UI
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/40825
2017-12-07 11:19:37 -06:00
Grzegorz Bizon 003a816afa Merge branch 'zj-multiple-artifacts' into 'master'
Multiple artifacts

See merge request gitlab-org/gitlab-ce!14367
2017-12-05 14:30:59 +00:00
Zeger-Jan van de Weg 61864a5a5b Rename Artifact to JobArtifact, split metadata out
Two things at ones, as there was no clean way to seperate the commit and
give me feedback from the tests.

But the model Artifact is now JobArtifact, and the table does not have a
type anymore, but the metadata is now its own model:
Ci::JobArtifactMetadata.
2017-12-03 12:04:48 +01:00
Zeger-Jan van de Weg 25df666156 Create Ci::Artifacts
To allow jobs/builds to have multiple artifacts, and to start seperating
concerns from Ci::Build a new model is created: Ci::Artifact.

Changes include the updating of the ArtifactUploader to adapt to a
slightly different interface. The uploader expects to be initialized
with a `Ci::Build`.

Futher a migration with the minimal fields, the needed foreign keys and
an index.

Last, the way this works is by prepending a module to Ci::Build so we
can basically override behaviour but if needed use `super` to get the
original behaviour.
2017-12-03 12:04:47 +01:00
Francisco Lopez 3527d1ff2b Undoing the change to ForkNetworkMember 2017-12-01 18:32:12 +01:00
Francisco Lopez fe95de8855 Fixed BasicProjectDetail parent 2017-12-01 18:32:12 +01:00
Francisco Lopez c0c0926acc Removed binding.pry 2017-12-01 18:32:12 +01:00
Francisco Lopez c7e7f4444c Removing blank line 2017-12-01 18:32:12 +01:00
Francisco Lopez fa6b0a36bd Changes after rebase 2017-12-01 18:32:12 +01:00
Francisco Lopez 194f7bca9a Comments from code review applied. Also switched forked_from_project and ForkedProjectLinks to ForkNetworkMember 2017-12-01 18:32:12 +01:00
Francisco Lopez 58c5b463ff Refactored /projects and /user/:user_id/projects endpoints 2017-12-01 18:32:12 +01:00
Stan Hu 02cd1702b2 Only serialize namespace essentials in group's projects API response 2017-12-01 18:32:12 +01:00
Stan Hu 39d293abd2 Omit the `all` call after Project#project_group_links to avoid unnecessary loads 2017-12-01 18:32:12 +01:00
Tomasz Maczukin 7b643c02c2
Modify output 2017-11-28 00:36:49 +01:00
Tomasz Maczukin 8d3e80692c
Add information about project 2017-11-28 00:36:48 +01:00
Douwe Maan dbf97574dc Merge branch '39887-move-identical-check-to-merged-branches' into 'master'
Move identical merged branch check to merged_branch_names

Closes #39887

See merge request gitlab-org/gitlab-ce!15464
2017-11-23 15:16:37 +00:00
Markus Koller 257fd57134 Allow password authentication to be disabled entirely 2017-11-23 13:16:14 +00:00
Lin Jen-Shin 7df1cb528e Move identical merged branch check to merged_branch_names 2017-11-23 18:26:41 +08:00
Travis Miller 1162d89ac4 Add administrative endpoint to list all pages domains 2017-11-13 16:05:44 +00:00
Douwe Maan 8138d58d42 Merge branch '37442-api-branches-id-repository-branches-is-calling-gitaly-n-1-times-per-request' into 'master'
Fetch the merged branches at once in the `/projects/:id/repository/branches` endpoint

See merge request gitlab-org/gitlab-ce!15215
2017-11-07 11:09:00 +00:00
Rémy Coutable 2ec5ae21b8 Merge branch 'add-changes-count-to-merge-requests-api' into 'master'
Add changes_count to the merge requests API

See merge request gitlab-org/gitlab-ce!15178
2017-11-07 10:58:03 +00:00
Rémy Coutable e78c701aff
Pass the Gitlab::Git::Branch object to Repository#merged_to_root_ref?
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-11-06 16:29:50 +01:00
Rémy Coutable b20984dea2
Improve performance of the /projects/:id/repository/branches API endpoint
Mitigate a N+1 requests to Gitaly problem. Still one left.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-11-06 13:31:23 +01:00
Mehdi Lahmam 08bc2f946b Expose `duration` in Job API entity
Closes #35794.
2017-11-05 21:59:58 +01:00
Sean McGivern 9d259c2232 Add changes_count to the merge requests API
This returns the `real_size` of the MR's diff, which is a string indicating the
number of changes. If the diff overflows after _n_ files, the string will be
`$n+`.
2017-11-03 14:28:18 +00:00
Douwe Maan fbdf057898 Remove private_token from API user entity 2017-11-02 11:39:01 +01:00