Commit Graph

283 Commits

Author SHA1 Message Date
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