Commit Graph

453 Commits

Author SHA1 Message Date
GitLab Bot 6d18e2830d Add latest changes from gitlab-org/gitlab@master 2021-04-05 18:09:15 +00:00
GitLab Bot 174560aed8 Add latest changes from gitlab-org/gitlab@master 2021-03-31 00:09:32 +00:00
GitLab Bot a156fc95eb Add latest changes from gitlab-org/gitlab@master 2021-03-25 12:09:19 +00:00
GitLab Bot 3bd9ad5574 Add latest changes from gitlab-org/gitlab@master 2021-03-25 03:09:35 +00:00
GitLab Bot 889bf7a0ee Add latest changes from gitlab-org/gitlab@master 2021-03-16 18:11:53 +00:00
GitLab Bot 0313282761 Add latest changes from gitlab-org/gitlab@master 2021-03-06 00:09:02 +00:00
GitLab Bot 0cbb4a7569 Add latest changes from gitlab-org/gitlab@master 2021-01-27 15:09:15 +00:00
GitLab Bot fcef382cb9 Add latest changes from gitlab-org/gitlab@master 2021-01-19 09:10:32 +00:00
GitLab Bot 038366a093 Add latest changes from gitlab-org/gitlab@master 2020-10-30 15:08:59 +00:00
GitLab Bot 99551d4458 Add latest changes from gitlab-org/gitlab@master 2020-10-20 06:09:03 +00:00
GitLab Bot 6a0085290e Add latest changes from gitlab-org/gitlab@master 2020-10-15 00:08:42 +00:00
GitLab Bot 14245e7755 Add latest changes from gitlab-org/gitlab@master 2020-08-12 21:09:54 +00:00
GitLab Bot 777f6da99a Add latest changes from gitlab-org/gitlab@master 2020-06-29 21:09:07 +00:00
GitLab Bot 60082b335c Add latest changes from gitlab-org/gitlab@master 2020-06-19 21:08:32 +00:00
GitLab Bot 6b7b853dff Add latest changes from gitlab-org/gitlab@master 2020-06-03 06:08:34 +00:00
GitLab Bot 47579e24f3 Add latest changes from gitlab-org/gitlab@master 2020-05-27 21:08:05 +00:00
GitLab Bot 53288eeb63 Add latest changes from gitlab-org/gitlab@master 2020-05-05 21:09:42 +00:00
GitLab Bot 2e4d8b3449 Add latest changes from gitlab-org/gitlab@master 2020-04-28 03:09:53 +00:00
GitLab Bot f569792df8 Add latest changes from gitlab-org/gitlab@master 2020-04-27 18:09:41 +00:00
GitLab Bot b11f7057d0 Add latest changes from gitlab-org/gitlab@master 2020-04-01 09:07:45 +00:00
GitLab Bot 8f9beefac3 Add latest changes from gitlab-org/gitlab@master 2020-03-23 12:09:47 +00:00
GitLab Bot ac1dca43ba Add latest changes from gitlab-org/gitlab@master 2020-03-09 12:07:45 +00:00
GitLab Bot d3c29eae5c Add latest changes from gitlab-org/gitlab@master 2020-03-05 21:08:13 +00:00
GitLab Bot 561e1b470f Add latest changes from gitlab-org/gitlab@master 2020-03-02 21:08:01 +00:00
GitLab Bot 736d36d859 Add latest changes from gitlab-org/gitlab@master 2020-02-28 15:09:13 +00:00
GitLab Bot 1ac794623a Add latest changes from gitlab-org/gitlab@master 2020-02-20 09:09:13 +00:00
GitLab Bot aa0f0e9921 Add latest changes from gitlab-org/gitlab@master 2020-01-16 18:08:46 +00:00
GitLab Bot 8b1228b0d4 Add latest changes from gitlab-org/gitlab@master 2020-01-10 15:07:47 +00:00
GitLab Bot 511e761b41 Add latest changes from gitlab-org/gitlab@master 2020-01-03 15:08:33 +00:00
GitLab Bot c2b98d3dbd Add latest changes from gitlab-org/gitlab@master 2019-12-17 15:08:15 +00:00
GitLab Bot 38bab6e158 Add latest changes from gitlab-org/gitlab@master 2019-12-13 03:07:50 +00:00
GitLab Bot e1867c38fc Add latest changes from gitlab-org/gitlab@master 2019-12-06 18:07:44 +00:00
GitLab Bot 5cb94fc486 Add latest changes from gitlab-org/gitlab@master 2019-11-23 00:06:06 +00:00
GitLab Bot 143f196f8b Add latest changes from gitlab-org/gitlab@master 2019-11-18 18:06:53 +00:00
GitLab Bot 3fe3436877 Add latest changes from gitlab-org/gitlab@master 2019-11-15 06:06:13 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
GitLab Bot 48c77599ca Add latest changes from gitlab-org/gitlab@master 2019-09-17 00:06:11 +00:00
GitLab Bot b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
Alessio Caiazza daf7810e2e Add Scalability/FileUploads cop
This cop prevents you from using file in API, it points you to the
development documentation about workhorse file acceleration.
2019-09-10 16:24:10 +00:00
Nick Thomas f7f91e84f7 Add a skip_users filter to the project users API
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.
2019-08-19 14:21:56 +05:30
Camil Staps 99bb207ef1
Fix tests 2019-08-07 20:49:16 +02:00
Camil Staps e8bdcdf0f8
Expose time since starring on project/:id/starrers API endpoint; exclude private profiles here as well 2019-08-07 20:49:16 +02:00
Camil Staps 1ec8c0e837
Fix API endpoint for starred projects of a user; add info about starred projects on profile to documentation 2019-08-07 20:49:16 +02:00
Camil Staps e7c34c37c8
Add documentation and changelog for !24690 2019-08-07 20:49:15 +02:00
Camil Staps d03a4c9a07
Add users/:user_id/starred_projects API endpoint for projects starred by a user 2019-08-07 20:49:14 +02:00
Camil Staps 5b20df0a92
Add projects/:id/starrers API endpoint for users who starred a repository 2019-08-07 20:49:13 +02:00
Imre Farkas 7aa1d17475 CE port of "Move external authorization service API management to EE"
EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14598
2019-07-17 07:20:17 +00:00
Stan Hu d48ee86053 Make Housekeeping button do a full garbage collection
Previously the Housekeeping button and API would use the counter of last
pushes to determine whether to do a full garbage collection, or whether
to do one of the less comprehensive tasks: a full repack, incremental
pack, or ref pack. This was confusing behavior, since a project owner
might have to click the button dozens of times before a full GC would be
initiated.

This commit forces a full GC each time this is initiated. Note that the
`ExclusiveLease` in `HousekeepingService` prevents users from clicking
on the button more than once a day.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63349
2019-07-03 00:21:33 -07:00
Imre Farkas 9cd70ec1cd CE port of Move EE specific lines in API::Projects 2019-05-30 21:55:17 +00:00
Kamil Trzciński 650f40865e Forbid the use of `#reload` and prefer `#reset`
The `#reload` makes to load all objects into memory,
and the main purpose of `#reload` is to drop the association cache.

The `#reset` seems to solve exactly that case.
2019-04-15 13:05:14 +02:00
John Jarvis 69b65a6b74 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into jarv/dev-to-gitlab-2019-04-02 2019-04-02 10:12:32 +02: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
Igor Drozdov 732f892db3 Return cached languages if they've been detected before 2019-03-20 20:33:49 +03: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 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
Nick Thomas 0b0a04fdf7 Merge branch 'zj-load-languages-from-database' into 'master'
Load repository language from the DB if detected

Closes #47390

See merge request gitlab-org/gitlab-ce!25518
2019-02-25 16:41:04 +00:00
Zeger-Jan van de Weg abe8cbe90b Load repository language from the DB if detected
The repository charts page used to detect the repository language for
each request that was made to the page. Given the detection is an
expensive operation and the same data is stored in the database the
database is now serving the request.

The same goes for an API endpoint that serves the languages.

When a repository is empty or non-existent the languages will always be
empty. And the language detection RPC isn't requested.

Closes: https://gitlab.com/gitlab-org/gitlab-ce/issues/47390
2019-02-25 15:15:16 +01:00
Małgorzata Ksionek 211c4e5985 Change policy regarding group visibility 2019-02-20 11:08:13 +01:00
Balasankar "Balu" C 39f77ad9b4
Let users set name/path on project fork using API 2019-02-20 00:19:27 +05:30
Luke Duncalfe 618b87448e Prevent leaking of private repo data through API
default_branch, statistics and config_ci_path are now only exposed if
the user has permissions to the repository.
2019-02-18 11:30:32 +13:00
Dylan MacKenzie b421bd316f Add programming language filtering to `/projects` 2019-02-04 15:06:17 +00:00
Robert Schilling a612bd0708 Unify user requirements for API slugs 2019-01-31 11:13:23 +01:00
Robert Schilling 2190704c61 API: Support username with dots 2019-01-15 17:16:03 +01:00
Heinrich Lee Yu 63e9969ca3 Refactor upload service to return uploader
Also changes old calls to the service
2019-01-07 11:16:58 +08:00
Imre Farkas b1e070bf49
Fix API::Namespaces to accept namepaces with dots
It also renames the API::PROJECT_ENDPOINT_REQUIREMENTS constant to
API::NAMESPACE_OR_PROJECT_REQUIREMENTS
2018-11-28 12:54:11 +01:00
J.D. Bean ff89680330 Feature/add license to project API 2018-10-26 15:12:14 +00:00
Tuomo Ala-Vannesluoma c84b60b164 Make GitLab pages support access control 2018-10-05 13:41:11 +00:00
gfyoung 3836d69119 Enable frozen string in lib/api and lib/backup
Partially addresses #47424.

Had to make changes to spec files because
stubbing methods on frozen objects is a mess
in RSpec and leads to failures:

https://github.com/rspec/rspec-mocks/issues/1190
2018-09-29 21:04:50 -07:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Toon Claes 7c9983c721 Allow project owners to set up forking relation through API
Before this change only GitLab admins where allowed to set up forking
relation through the API. This changes that so project owners can
do this too.

Closes gitlab-org/gitlab-ce#40550.
2018-08-20 16:25:02 +02:00
James Ramsay 79d90cb6bd Use Projects::UpdateService to archive projects
System hooks were not being triggered when projects were archived or
unarchived. Reuse the Projects::UpdateService to automatically
trigger system hooks and increase code reuse.
2018-08-03 11:55:21 -04:00
Tiago Botelho d138a949da Backports EE-1499 to CE 2018-07-27 16:24:43 +01:00
Marko, Peter 6d72bb3832 Add min_access_level filter to projects API
Signed-off-by: Marko, Peter <peter.marko@siemens.com>
2018-07-23 20:57:50 +02:00
Valery Sizov c3c7f26a34 Backport of gitlab-org/gitlab-ee!6137 2018-07-19 18:32:12 +00:00
Marko, Peter 209fd86442 Fix archived parameter for projects API 2018-07-16 16:25:38 +02:00
Jamie Schembri 38d407d7a7 Fix #48537 - Update avatar only via the projects API 2018-07-09 19:03:44 +02:00
Aram Visser c3de6a8673 Add transfer project endpoint to the Projects API 2018-06-27 18:21:18 +07:00
Douwe Maan cda2c5e76f
Only preload member records for the relevant projects/groups/user in projects API 2018-05-30 15:58:39 +02:00
Mark Fletcher 5716167775 Fix project creation for user endpoint bug
In this endpoint the `jobs_enabled` parameter must be
translated to `builds_enabled` before being passed to
the `Projects::CreateService`.
2018-04-23 08:22:16 +01:00
🙈 jacopo beschi 🙉 c6b1043e9d Resolve "Make a Rubocop that forbids returning from a block" 2018-04-18 09:19:40 +00:00
Roger Rüttimann e467a11ec7 Feature/add language in repository to api 2018-04-13 08:06:04 +00:00
Bob Van Landuyt 11a9fbe65b Make the API project params reusable 2018-04-04 19:49:48 +02:00
Jan f6d58310fc Resolve "Allow the configuration of a project's merge method via the API" 2018-04-04 09:56:38 +00:00
Jan 54baf3a362 Resolve "Forking with namespace doesn't work (API)" 2018-03-26 09:22:03 +00:00
Kárpáti László 8bdfd8aa87 Resolve "API: PUT /projects/:id fails when only ci_config_path is specified" 2018-02-21 15:57:26 +00:00
Markus Koller b7cd99c376
Allow including custom attributes in API responses 2018-02-08 13:30:34 +01:00
Yorick Peterse cca61980d5
Track and act upon the number of executed queries
This ensures that we have more visibility in the number of SQL queries
that are executed in web requests. The current threshold is hardcoded to
100 as we will rarely (maybe once or twice) change it.

In production and development we use Sentry if enabled, in the test
environment we raise an error. This feature is also only enabled in
production/staging when running on GitLab.com as it's not very useful to
other users.
2018-02-01 17:00:46 +01: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
🙈 jacopo beschi 🙉 729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
Francisco Javier López c9871e84e4 The API isn't using the appropriate services for managing forks 2017-12-07 08:44:55 +00:00
Francisco Lopez 966f83f965 Undoing debugging change 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
Markus Koller 6902848a9c
Support custom attributes on projects 2017-11-06 10:51:46 +01:00
Mark Fletcher 63e0a42317 Add an API endpoint to determine the forks of a project 2017-09-20 08:27:16 +10:00
Ashley Dumaine a3f76b76a4 change collapse to resolve and comments to discussions 2017-09-06 10:07:47 +01:00
Ashley Dumaine ef4b3a39bc Add functionality to collapse outdated diff comments regardless of discussion resolution 2017-09-06 10:07:46 +01:00
Robert Schilling 6a2ee0968e API: Use defined project requirements 2017-08-31 14:57:47 +02:00
Robert Schilling ee4820a526 Add a spec when ressource is not modified 2017-08-29 10:12:10 +02:00
Robert Schilling dcd4ea473c Update remaining endpoints 2017-08-28 17:10:30 +02:00
Robert Schilling e80313f9ee Conditionally destroy a ressource 2017-08-28 16:40:25 +02:00
Robert Schilling 998afa5f74 API: Respect the 'If-Unmodified-Since' for delete endpoints 2017-08-28 16:40:25 +02:00
Yorick Peterse aef9f1eb94
Cache the number of forks of a project
The number of forks of a project doesn't change very frequently and
running a COUNT(*) every time this information is requested can be quite
expensive. We also end up running such a COUNT(*) query at least twice
on the homepage of a project.

By caching this data and refreshing it when necessary we can reduce
project homepage loading times by around 60 milliseconds (based on the
timings of https://gitlab.com/gitlab-org/gitlab-ce).
2017-08-14 18:00:28 +02:00
Dmitriy Zaporozhets 6b8ad689da
Update grape gem
New version of the gem returns 200 status code on delete with content
instead of 204 so we explicitly set status code to keep existing
behavior

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-07-20 16:33:18 +03:00
Rémy Coutable 033acc0120
Fix some N+1 queries in the GET /projects API
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-07 02:38:18 +02:00
Rémy Coutable 050eae8c4d Merge branch '33657-user-projects-api' into 'master'
Add user projects API

Closes #33657

See merge request !12596
2017-07-06 09:18:06 +00:00
vanadium23 8d44d5142a Add user projects API 2017-07-06 08:04:54 +03:00
Lin Jen-Shin 9f5ac179d1 Rename ci_config_file to ci_config_path 2017-07-05 20:11:01 +08:00
Lin Jen-Shin d7c32c5870 Fix various descriptions given the feedback 2017-07-04 02:00:50 +08:00
Lin Jen-Shin 62fdbbeeb0 Merge remote-tracking branch 'upstream/master' into 32815--Add-Custom-CI-Config-Path
* upstream/master: (123 commits)
  Backport changes to Projects::IssuesController and the search bar
  bugfix: use `require_dependency` to bring in DeclarativePolicy
  Resolve "Select branch dropdown is too close to branch name"
  Clean up issuable lists
  Defer project destroys within a namespace in Groups::DestroyService#async_execute
  Fixed new navgiation bar logo height in Safari
  Resolve "Issue dropdown persists when adding issue number to issue description"
  Move verification to block level instead of paragraph
  Revert "Merge branch 'dm-drop-default-scope-on-sortable-finders' into 'master'"
  Added code for defining SHA attributes
  Minor edits
  Job details won't scroll horizontally to show long lines
  Run mysql tests on stable preperation branches like 9-3-stable-patch-2
  Bring back branches badge to main project page
  optimize translation content based on comments
  supplement traditional chinese in taiwan translation
  Inserts exact matches of username, email and name to the top of the user search list
  Remove Namespace model default scope override and write additional test to Project search
  optimize translation content based on comments
  Limit OpenGraph image size to 64x64
  ...
2017-06-30 13:46:51 +08:00
http://jneen.net/ 7765dd6a1d bugfix: use `require_dependency` to bring in DeclarativePolicy 2017-06-29 11:57:59 -07:00
Lin Jen-Shin 35674fcd47 Merge remote-tracking branch 'upstream/master' into 15041-Add-Custom-CI-Config-Path
* upstream/master: (12506 commits)
  Update CHANGELOG.md for 9.3.2
  Update architecture.md
  Fix changelog entry file extension
  Fix head pipeline stored in merge request for external pipelines
  updated gitlab-ci.yml to compile locale
  Ignore JSON files generated from PO files
  Update mmap2 gem tha disables mmap_obj.gsub! as current implementation uses method that is no longer part of Ruby API
  Disable rainbow during SimpleExecutor specs to have consistence
  Slightly refactor pipeline schedules form in preparation for additions
  Resolve "Submitting reply to existing diff discussion using Cmd/Ctrl+Enter submits twice and refreshes page"
  Make the SimpleExecutor rescue exceptions in the executing Checks
  Resolve "Unable to access edit comment from dropdown menu in certain screen sizes"
  Update changelog item
  revert removal of requestAnimationFrame and move to a separate MR/discussion
  rename getEmojiCategoryMap and remove unnecessary parameter
  Action Buttons on Prio Labels working again by setting pointer events to none on…
  Remove 'contains' option from Commit.find_all
  Remove Gitlab::Git::Repository#find_all
  Use latest chrome and chrome driver in GitLab QA
  Polish sidebar toggle
  ...
2017-06-28 15:53:12 +08:00
http://jneen.net/ 59e7c39f4c use subject scope in :id/users
since we're loading all the members anyways
2017-06-27 12:44:38 -07:00
David Turner 1cd1bab3af add printing_merge_request_link_enabled to API 2017-06-19 13:33:15 -04:00
vanadium23 4ccd799832 Accept image for avatar in project API 2017-06-09 22:49:57 +03:00
Mark Fletcher ad3e180ed3 Introduce an Events API
* Meld the following disparate endpoints:
 * `/projects/:id/events`
 * `/events`
 * `/users/:id/events`
+ Add result filtering to the above endpoints:
 * action
 * target_type
 * before and after dates
2017-06-06 20:16:41 +08:00
Rémy Coutable 4cfa5ce4a9
Enable the Style/PreferredHashMethods cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-02 19:11:26 +02:00
Athar Hameed 578adc9bc6 Fix missing optional path parameter in "Create project for user" API 2017-06-02 20:58:48 +08:00
Douwe Maan 4ad85b22e2 Merge branch 'tc-improve-project-api-perf' into 'master'
Improve /project API performance

Closes #31855 and #31937

See merge request !11666
2017-05-31 13:45:00 +00:00
vanadium23 0684073d1e Add tag_list param to project api 2017-05-31 09:02:33 +03:00
Toon Claes db679788e4 Add :owned param to ProjectFinder
And use it in the API.
2017-05-30 22:45:59 +02:00
Toon Claes 0f0b9a8466 Use helper to construct Finder params
The ProjectsFinder and GroupFinder both support the same set of params. And the
`/api/v4/projects` and `/api/v4/group/:id/projects` also support the same set of
params. But they do not match the Finder params. So use a helper method to
transform them.
2017-05-30 22:45:59 +02:00
Toon Claes a1deed629e Use ProjectFinder to filter the projects
Instead of trying to do the heavy lifting in the API itself, use the existing
features of the ProjectFinder.
2017-05-30 22:45:59 +02:00
Toon Claes 07fc79e7c5 Handle `membership` in ProjectFinder
The ProjectFinder supports the `non_public` parameter. This can be used to find
only projects the user is member of.
2017-05-30 22:45:59 +02:00
Toon Claes 4fda13b68e Build options hash after finding the list of projects
Because this order makes more sense and makes the code easier to read.
2017-05-30 22:45:58 +02:00
Toon Claes 44fdf0a1e3 Move ProjectsFinder to `present_projects` for simplification
To avoid passing parameters double, move all filtering to the `present_projects`
helper.
2017-05-30 22:41:29 +02:00
blackst0ne a7349560b2 'New issue'/'New merge request' dropdowns should show only projects with issues/merge requests feature enabled 2017-05-30 15:35:49 +11:00
Rémy Coutable 3db37e0562 Enable the Style/TrailingCommaInArguments cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Rémy Coutable d40e1f547e Enable the Style/TrailingCommaInLiteral cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Sean McGivern ba608dc0f2 Merge branch '12910-uploader-pers-snippet' into 'master'
Prepare uploaders for personal snippets comments

See merge request !11022
2017-05-04 10:47:10 +00:00
Mark Fletcher 21f5515a5f Expose project statistics on single requests via the API
+ The statistics parameter was already accepted
* This commit ensure that it is respected for GET /projects/:id endpoint
+ Add documentation of the parameter and update the example response for stats
2017-05-03 18:45:19 +08:00
Jarka Kadlecova 43ff738641 Support uploaders for personal snippets comments 2017-05-02 15:22:24 +02:00
winniehell de2c2d9cc6 Replace builds_enabled with jobs_enabled in projects API v4 (!10786) 2017-04-20 00:29:09 +02:00
Oswaldo Ferreira fd32960e7c Separate CE params on Grape API 2017-04-10 16:13:48 -03:00
Jacopo b996a82ff4 ProjectsFinder should handle more options
Extended ProjectFinder in order to handle the following options:
 - current_user - which user use
 - project_ids_relation: int[] - project ids to use
 - params:
   -  trending: boolean
   -  non_public: boolean
   -  starred: boolean
   -  sort: string
   -  visibility_level: int
   -  tags: string[]
   -  personal: boolean
   -  search: string
   -  non_archived: boolean

GroupProjectsFinder now inherits from ProjectsFinder.
Changed the code in order to use the new available options.
2017-04-06 07:11:37 +02:00
Rémy Coutable 63360adeae
Add `requirements: { id: %r{[^/]+} }` for all projects and groups namespaced API routes
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-16 18:00:24 +01:00
Toon Claes 6357635686 Rename query parameter to `membership`
The query parameter `membership` should be more self-explaining.
2017-03-03 13:42:39 +01:00
Toon Claes a3fdd6acd2 Use string based `visibility` getter & setter
Add `visibility` & `visibility=` methods to the
`Gitlab::VisibilityLevel` module so the `visibility_level` can be
get/set with a string value.
2017-03-02 12:15:25 +01:00
Toon Claes b2c2dfe545 Expose Project's & ProjectSnippet's VisibilityLevel as String
Instead of exposing the VisibilityLevel as Integer, expose it as
String `visibility` for Project and ProjectSnippet.

Filter queries also accept the `visibility` as String instead of
`visibility_level` as Integer.

Also remove the `public` boolean.
2017-03-02 09:33:24 +01:00
James Lopez a0101ebf84 Update occurrences of MWBS to MWPS
Rename column in the database
 Rename fields related to import/export feature
 Rename API endpoints
 Rename documentation links
 Rename the rest of occurrences in the code
 Replace the images that contain the words "build succeeds" and docs referencing to them
 Make sure pipeline is green and nothing is missing.

updated doc images

renamed only_allow_merge_if_build_succeeds in projects and fixed references

more updates

fix some spec failures

fix rubocop offences

fix v3 api spec

fix MR  specs

fixed issues with partials

fix MR spec

fix alignment

add missing v3 to v4 doc

wip - refactor v3 endpoints

fix specs

fix a few typos

fix project specs

copy entities fully to V3

fix  entity error

more fixes

fix failing specs

fixed missing entities in V3 API

remove comment

updated code based on feedback

typo

fix spec
2017-03-01 12:02:02 +01:00
Sean McGivern 0226fb0e1f Merge branch '6073_project_api' into 'master'
API project create: Make name or path required

Closes #6073

See merge request !9416
2017-02-28 16:29:00 +00:00
Robert Schilling 86c58687b2 Return 204 for delete endpoints 2017-02-28 08:32:38 +01:00
Jarka Kadlecova 08ee177d6f API project create: Make name or path required 2017-02-27 07:55:45 +01:00
Oswaldo 2b001d9e7a Return 202 with JSON body on async removals on V4 API 2017-02-23 19:55:13 -03:00
Douwe Maan 99a34a52d7 Enable Style/MultilineArrayBraceLayout 2017-02-23 09:32:22 -06:00
Douwe Maan c10064aad5 Enable Style/SpaceInsideBrackets 2017-02-23 09:31:56 -06:00
Mark Fletcher d3425933dd Add housekeeping endpoint for Projects API 2017-02-22 17:40:20 +05:30
Robert Schilling 039c6d60fa API: Moved `DELETE /projects/:id/star` to `POST /projects/:id/unstar` 2017-02-20 15:14:48 +01:00
Toon Claes 4e9e29d295 API: Consolidate /projects endpoint
It consolidates these endpoints:
 - /projects
 - /projects/owned
 - /projects/visible
 - /projects/starred
 - /projects/all

Into the /projects endpoint using query parameters.
2017-02-14 16:41:57 +01:00
Oswaldo Ferreira c2102e6e3b Move /projects/fork/:id to /projects/:id/fork 2017-02-13 16:58:11 -02:00