Fabio Busatto
035c8af12e
Resolve "Get milestone by title via API"
2019-03-27 09:01:07 +00:00
James Lopez
82da4b1fd4
Merge branch 'bvl-allow-more-repos-per-resource-ce' into 'master'
...
Allow multiple repositories per project
See merge request gitlab-org/gitlab-ce!26539
2019-03-27 07:37:06 +00:00
Robert Speicher
2b3f072485
Merge branch 'backport-api-parameters' into 'master'
...
Backport EE API parameters in lib/api
See merge request gitlab-org/gitlab-ce!26369
2019-03-26 17:30:46 +00:00
Yorick Peterse
cbe21d78bf
Backport parameters for API::Parameters
...
This backports the EE specific parameters for API::Parameters, wrapping
them in a conditional.
2019-03-26 14:18:29 +01:00
Yorick Peterse
449d2bb0d8
Backport parameters for API::Users
...
This backports the EE specific parameters for API::Users, and wraps them
in a conditional.
2019-03-26 14:18:29 +01:00
Yorick Peterse
30fb9fffec
Backport API parameters for API::Settings
...
This backports the API parameters from API::Settings that were added in
EE, wrapping them in a conditional.
2019-03-26 14:18:29 +01:00
Yorick Peterse
05534daa1c
Backport changes to API::ProtectedBranches
...
This backports EE specific parameters EE adds to API::ProtectedBranches,
and wraps them in a conditional.
2019-03-26 14:18:29 +01:00
Yorick Peterse
be49d9c1ba
Backport parameters from API::Projects
...
This backports various parameter changes EE makes to API::Projects,
along with moving some code around to make it easier to extend in EE.
2019-03-26 14:18:29 +01:00
Yorick Peterse
71046be7d5
Backport API::Issues parameters from EE
...
This backports the parameters that EE adds to API::Issues, and wraps
them in conditionals so they are only used in EE.
2019-03-26 14:18:29 +01:00
Yorick Peterse
b5623d3fd9
Backport API::Helpers::ProjectsHelpers from EE
...
This backports all changes made to this module in EE to CE, and wraps EE
specific code in a conditional.
2019-03-26 14:18:28 +01:00
Yorick Peterse
c3b24826d1
Backport EE API parameters for API::Groups
...
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.
2019-03-26 14:18:28 +01:00
Bob Van Landuyt
d36415b754
Allow multiple repositories per project
...
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.
2019-03-26 13:21:03 +01:00
Peter Marko
12adb2a4bc
Show statistics also when repository is disabled
2019-03-23 12:06:50 +01:00
Thiago Presa
538741f230
Add highest_role method to User
2019-03-22 09:54:03 +00:00
Alexis Reigel
27ac48c394
Apply suggestion to lib/api/search.rb
2019-03-15 21:03:49 +01:00
Alexis Reigel
fcf90d051b
un-dry the search api scope
...
due to the usage in EE this attempt to more DRYness is not worth it.
2019-03-14 18:39:54 +01:00
Alexis Reigel
b0981097c3
return 400 on users search and feature is disabled
...
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.
2019-03-14 18:39:54 +01:00
Alexis Reigel
55629a2e4d
add feature flag for users search
2019-03-14 18:30:30 +01:00
Alexis Reigel
c36d98501b
extract helper for search scope api param
2019-03-14 18:30:29 +01:00
Alexis Reigel
0592233a1a
add users search to search api
2019-03-14 18:21:01 +01:00
Nick Thomas
9f05e97aad
Run rubocop -a
2019-03-13 13:42:43 +00:00
Robert Speicher
ccbbc1000d
Merge branch 'resolve-lib-differences' into 'master'
...
Resolve CE to EE differences in the lib/api directory
See merge request gitlab-org/gitlab-ce!25430
2019-03-12 17:03:50 +00:00
Fabio Papa
91ebfcb6cc
Remove fake repository_path response
...
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 .
2019-03-12 16:27:26 +00:00
Bob Van Landuyt
b0fac091ec
Authenticate the internal API using a header
...
Instead of mixing in the shared secret into the querystring or body,
we could also specify it in a header.
2019-03-11 16:46:04 +01:00
Igor
9745d0de2f
Provide EE backports for filtering by approver feature
...
Adds custom validator for ArrayNoneAny param
Extracts some logic in js into separate files
2019-03-07 23:55:45 +00:00
Igor
e779477e8c
Revert "Merge branch 'id-1951-filter-merge-requests-by-approvers' into 'master'"
...
This reverts merge request !24982
2019-03-07 14:59:43 +00:00
Sean McGivern
3781cbe0c3
Merge branch 'sh-optimize-todos-api' into 'master'
...
Significantly reduce N+1 queries in /api/v4/todos endpoint
Closes #40378
See merge request gitlab-org/gitlab-ce!25711
2019-03-07 10:29:04 +00:00
Igor
572e3f2254
Provide EE backports for filtering by approver feature
...
Adds custom validator for ArrayNoneAny param
Extracts some logic in js into separate files
2019-03-07 07:06:54 +00:00
Robert Speicher
12818c2043
Merge branch '41888-access-personal-snippets-by-api' into 'master'
...
Allow all snippets to be accessed by API
Closes #41888
See merge request gitlab-org/gitlab-ce!25772
2019-03-06 19:47:05 +00:00
Andrew Newdigate
3288e1a874
Adds the Rubocop ReturnNil cop
...
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
2019-03-06 17:51:56 +02:00
Stan Hu
062efe4f7a
Significantly reduce N+1 queries in /api/v4/todos endpoint
...
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
2019-03-06 07:03:46 -08:00
Sean McGivern
f1185520b9
Merge branch 'api-mr-put-labels' into 'master'
...
PUT MergeRequest API endpoint - accept labels as an array
See merge request gitlab-org/gitlab-ce!19914
2019-03-06 14:13:22 +00:00
Alexandru Croitor
be3578d245
Add array support for labels
...
* Support label parameter as comma separated and array of strings
for merge requests and issues api endpoints
2019-03-06 13:28:42 +02:00
Roger Rüttimann
4db8336786
API: delete job_artifacts of a single job
2019-03-06 11:06:21 +00:00
Mario de la Ossa
ee8cb2d1b3
PUT MergeRequest API endpoint - accept labels as an array
2019-03-06 12:56:29 +02:00
Patrick Bajao
de5aef3bbd
Accept force option on commit via API
...
When `force` is set to `true` and `start_branch` is set, the
branch will be ovewritten with the new commit based on the
`HEAD` of the `start_branch`.
This commit includes changes to update the `gitaly-proto` gem.
2019-03-06 10:44:59 +00:00
Nick Thomas
e05a86cecd
Allow all personal snippets to be accessed by API
...
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.
2019-03-06 09:05:03 +00:00
Nick Thomas
21779d0018
Add metadata about the GitLab server to GraphQL
2019-03-05 15:00:32 +00:00
Yorick Peterse
59db98a0ca
Merge dev master into GitLab.com master
2019-03-04 19:44:46 +01:00
Yorick Peterse
6683298fe6
Merge branch 'security-commit-private-related-mr' into 'master'
...
Don't allow non-members to see private related MRs
Closes #2787
See merge request gitlab/gitlabhq!2866
2019-03-04 18:37:10 +00:00
Igor Drozdov
5169dafccf
Forbid creating discussions for users with restricted access
2019-03-04 18:37:08 +00:00
Yorick Peterse
9faf957bd3
Merge branch 'security-protect-private-repo-information' into 'master'
...
Fix leaking private repository information in API
See merge request gitlab/gitlabhq!2881
2019-03-04 18:37:03 +00:00
Yorick Peterse
d8b4e585a1
Merge branch 'security-tags-oracle' into 'master'
...
Prevent Releases links API to leak tag existence
Closes #2795
See merge request gitlab/gitlabhq!2893
2019-03-04 18:37:01 +00:00
Yorick Peterse
b50ad88460
Merge branch '2802-security-add-public-internal-groups-as-members-to-your-project-idor' into 'master'
...
Add public/internal groups as members to your Project(IDOR)
See merge request gitlab/gitlabhq!2898
2019-03-04 18:36:52 +00:00
Yorick Peterse
a7004e2825
Add method to API::Variables for filtering params
...
This allows EE to customize the parameters used in two places, without
having to modify the source code directly.
2019-03-04 17:44:57 +01:00
Yorick Peterse
3f629b8d14
Update Triggers documentation per EE
...
This backports a line from EE so that both the CE and EE code are
identical.
2019-03-04 17:44:57 +01:00
Yorick Peterse
85f11eff9b
Refactor API::Settings for EE
...
This refactors API::Settings so that EE can more easily extend its
behaviour, without having to modify the CE source code directly.
2019-03-04 17:44:57 +01:00
Yorick Peterse
3156db3293
Move API::Services constants to a helper
...
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.
2019-03-04 17:44:57 +01:00
Yorick Peterse
712148518b
Refactor API::Search for EE
...
This refactors API::Search so that Enterprise Edition can more easily
extend its functionality, without having to modify the file directly.
2019-03-04 17:44:57 +01:00
Yorick Peterse
6c9e26a2a0
Move eventable types constant to a helper
...
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.
2019-03-04 17:44:56 +01:00