Commit Graph

2602 Commits

Author SHA1 Message Date
Yorick Peterse a349a4269c Merge branch 'search-100' into 'master'
Use limit for search count queries

See merge request gitlab-org/gitlab-ce!16502
2018-01-24 20:21:40 +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
Toon Claes d38faa30ed Add documentation about when the application API was added 2018-01-24 09:42:04 +01:00
Nicolas MERELLI 81bbcfacb0 Add application create API 2018-01-24 09:42:04 +01:00
Jan Provaznik 090ca9c33e Use limit for search count queries
Search query is especially slow if a user searches a generic string
which matches many records, in such case search can take tens of
seconds or time out. To speed up the search query, we search only for
first 1000 records, if there is >1000 matching records we just display
"1000+" instead of precise total count supposing that with such amount
the exact count is not so important for the user.

Because for issues even limited search was not fast enough, 2-phase
approach is used for issues: first we use simpler/faster query to get
all public issues, if this exceeds the limit, we just return the limit.
If the amount of matching results is lower than limit, we re-run more
complex search query (which includes also confidential issues).
Re-running the complex query should be fast enough in such case because the
amount of matching issues is lower than limit.

Because exact total_count is now limited, this patch also switches to
to "prev/next" pagination.

Related #40540
2018-01-23 22:33:42 +01:00
Oswaldo Ferreira dc84313e73 Return more consistent values for merge_status on MR API 2018-01-23 19:08:24 -02:00
Jacob Vosmaer (GitLab) 583cff8d61 Default to Gitaly for 'git push' HTTP/SSH, and make Gitaly mandatory for SSH pull 2018-01-22 16:51:47 +00:00
Rémy Coutable c4904d570c Merge branch '41673-blank-query-members-api' into 'master'
Resolve "Project/#/Members?query= blank causes 500 error"

Closes #41673

See merge request gitlab-org/gitlab-ce!16235
2018-01-22 15:27:15 +00:00
Rémy Coutable bd5bb6ee91 Merge branch '42231-protected-branches-api-route-returns-404-for-branches-with-dots' into 'master'
Resolve "Protected branches API route returns 404 for branches with dots"

Closes #42231

See merge request gitlab-org/gitlab-ce!16591
2018-01-22 08:45:36 +00:00
Mark Fletcher 062f5b7126 Fix error on empty query for Members API 2018-01-21 16:36:55 +00:00
Mark Fletcher 5a160b05ed Fix protected branches API to accept name parameter with dot 2018-01-19 20:07:44 +00:00
Jan Christophersen 795e546b1c Resolve "Projects API: filter 'with_issues_enabled=true' returns projects with 'issues_enabled=false'" 2018-01-19 07:33:58 +00: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
Sean McGivern d617c24f59 Merge branch '42129-fix-project-snippet-user-agent-detail' into 'master'
Fix the user-agent detail API endpoint for project snippets

Closes #42129

See merge request gitlab-org/gitlab-ce!16521
2018-01-18 11:18:44 +00:00
Oswaldo Ferreira f351cc28c2 Merge branch 'sh-backport-10-3-4-security-fixes' into 'master'
Backport 10.3.4 security fixes into master

See merge request gitlab-org/gitlab-ce!16509
2018-01-17 20:26:59 +00:00
Nick Thomas 1a3bcc76ea
Fix the user-agent detail API endpoint for project snippets 2018-01-17 14:30:07 +00:00
Oswaldo Ferreira d1eb3ff594 Make ruby lint happy 2018-01-17 11:42:32 -02:00
Jacopo 310d209b67 Adds sorting to deployments API
Adds sorting to deployments API through the `order_by` and sort
`fields`.
2018-01-17 08:47:55 +01: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
Stan Hu 191b5153c8 Merge branch 'builds-api-nplusone' into 'master'
Resolve "N+1 queries with /projects/:project_id/builds API endpoint"

Closes #41957

See merge request gitlab-org/gitlab-ce!16445
2018-01-16 16:56:05 +00:00
Jacopo fa84b98796 Enables Project Milestone Deletion via API
Enables project milestone deletion via DELETE /projects/:id/milestones/:milestone_id
2018-01-16 13:11:59 +01:00
Matija Čupić feb3449709
Use preload instead of includes to avoid joins 2018-01-15 22:04:08 +01:00
Sean McGivern 1df5c74fc9 Merge branch '42025-fix-issue-api' into 'master'
[API] Fix creating issue when assignee_id is empty

See merge request gitlab-org/gitlab-ce!16458
2018-01-15 13:11:22 +00:00
Douwe Maan 26d351ddee Merge branch 'fix-duplication-circuit-breakers' into 'master'
Fix duplication in API::CircuitBreakers

See merge request gitlab-org/gitlab-ce!16456
2018-01-15 12:31:07 +00:00
Valery Sizov 1b1cc6fb14 [API] Fix creating issue when assignee_id is empty
see https://gitlab.com/gitlab-org/gitlab-ce/issues/42025
2018-01-15 14:24:16 +02:00
Serdar Dogruyol b2dcb55316 Fix duplication in API::CircuitBreakers 2018-01-15 14:03:39 +03:00
Matija Čupić 87cc03736c
Fix N+1 builds query in Jobs list API 2018-01-14 23:14:11 +01:00
Matija Čupić c9840842f1
Eager load user, runner, pipeline and its creator 2018-01-14 23:14:09 +01:00
Matija Čupić c9a1a1552a
Fix N+1 in v3 builds API
The N+1 issue was caused by loading the job_artifacts_archive for each
job (build) individually. Including that in the builds
AssociationRelation fixed the issue.
2018-01-13 22:40:14 +01:00
🙈 jacopo beschi 🙉 729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00: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
Sean McGivern 06713cb7b0 Merge branch '39214__pipeline_api' into 'master'
Add `pipelines` endpoint to merge requests API

Closes #39214

See merge request gitlab-org/gitlab-ce!15454
2018-01-11 11:29:53 +00:00
Tony Rom 7ed08fcd5d Fix style 2018-01-10 20:05:34 +03:00
Francisco Javier López f6c1d38259 Add option to disable commit stats to commit API 2018-01-09 11:36:12 +00:00
Douwe Maan 2e4a1b3b78 Merge branch 'jej/backport-authorized-keys-to-ce' into 'master'
Backport authorized_keys

Closes gitlab-ee#3953

See merge request gitlab-org/gitlab-ce!16014
2018-01-09 11:21:23 +00:00
Stan Hu eaf9088ba8 Save user ID and username in Grape API log (api_json.log)
This will enable admins to identify who actually made the API request.

Relates to #36960
2018-01-08 21:23:24 -08:00
Pablo Carranza ac86b2043d Backport authorized_keys branch 'find-key-by-fingerprint'
Add find key by base64 key or fingerprint to the internal API

See merge request !250

Squashed changes:
Add unique index to fingerprint
Add new index to schema
Add internal api to get ssh key by fingerprint
Change API endpoint to authorized_keys
Add InsecureKeyFingerprint that calculates the fingerprint without shelling out
Add require for gitlab key fingerprint
Remove uniqueness of fingerprint index
Remove unique option from migration
Fix spec style in fingerprint test
Fix rubocop complain
Extract insecure key fingerprint to separate file
Change migration to support building index concurrently
Remove those hideous tabs
2018-01-08 20:34:16 +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
Brent Greeff 34b9cc9674 API: get participants from merge_requests & issues 2018-01-05 15:21:53 +00: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
Rémy Coutable 9f58dd6119 Merge branch 'feature/api_runners_online' into 'master'
Add online attribute to runner api entity

Closes #25774

See merge request gitlab-org/gitlab-ce!11750
2018-01-05 11:13:43 +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
Grzegorz Bizon 9ca898c4ed Merge branch 'rd-api-request-to-edit-wiki-page-fails-when-project-belongs-to-group' into 'master'
Fix API endpoints to edit wiki pages where project belongs to a group

Closes #40453

See merge request gitlab-org/gitlab-ce!16170
2018-01-04 08:38:19 +00: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