summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
Commit message (Collapse)AuthorAgeFilesLines
* Cache the number of forks of a projectforks-count-cacheYorick Peterse2017-08-141-0/+2
| | | | | | | | | | | 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).
* Update grape gemdz-update-grapeDmitriy Zaporozhets2017-07-201-0/+2
| | | | | | | | 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>
* Fix some N+1 queries in the GET /projects APIRémy Coutable2017-07-071-0/+8
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch '33657-user-projects-api' into 'master'Rémy Coutable2017-07-061-48/+65
|\ | | | | | | | | | | | | Add user projects API Closes #33657 See merge request !12596
| * Add user projects APIvanadium232017-07-061-48/+65
| |
* | Rename ci_config_file to ci_config_pathLin Jen-Shin2017-07-051-1/+1
| |
* | Fix various descriptions given the feedbackLin Jen-Shin2017-07-041-1/+1
| |
* | Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2017-06-301-1/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * bugfix: use `require_dependency` to bring in DeclarativePolicybugfix/declarative-policy-reloadinghttp://jneen.net/2017-06-291-1/+1
| |
| * use subject scope in :id/usershttp://jneen.net/2017-06-271-1/+3
| | | | | | | | since we're loading all the members anyways
* | Merge remote-tracking branch 'upstream/master' into ↵15041-Add-Custom-CI-Config-PathLin Jen-Shin2017-06-281-352/+297
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * add printing_merge_request_link_enabled to APIDavid Turner2017-06-191-0/+2
| |
| * Accept image for avatar in project APIvanadium232017-06-091-0/+1
| |
| * Introduce an Events APIMark Fletcher2017-06-061-10/+0
| | | | | | | | | | | | | | | | | | | | | | * 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
| * Enable the Style/PreferredHashMethods coprc/enable-PreferredHashMethods-copRémy Coutable2017-06-021-2/+2
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Fix missing optional path parameter in "Create project for user" API33242-create-project-for-user-api-ignores-path-parameterAthar Hameed2017-06-021-0/+1
| |
| * Merge branch 'tc-improve-project-api-perf' into 'master'Douwe Maan2017-05-311-14/+12
| |\ | | | | | | | | | | | | | | | | | | Improve /project API performance Closes #31855 and #31937 See merge request !11666
| | * Add :owned param to ProjectFinderToon Claes2017-05-301-1/+1
| | | | | | | | | | | | And use it in the API.
| | * Use helper to construct Finder paramsToon Claes2017-05-301-8/+1
| | | | | | | | | | | | | | | | | | | | | 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.
| | * Use ProjectFinder to filter the projectsToon Claes2017-05-301-0/+4
| | | | | | | | | | | | | | | Instead of trying to do the heavy lifting in the API itself, use the existing features of the ProjectFinder.
| | * Handle `membership` in ProjectFinderToon Claes2017-05-301-1/+4
| | | | | | | | | | | | | | | The ProjectFinder supports the `non_public` parameter. This can be used to find only projects the user is member of.
| | * Build options hash after finding the list of projectsToon Claes2017-05-301-5/+6
| | | | | | | | | | | | Because this order makes more sense and makes the code easier to read.
| | * Move ProjectsFinder to `present_projects` for simplificationToon Claes2017-05-301-12/+9
| | | | | | | | | | | | | | | To avoid passing parameters double, move all filtering to the `present_projects` helper.
| * | Add tag_list param to project apivanadium232017-05-311-0/+2
| |/
| * 'New issue'/'New merge request' dropdowns should show only projects with ↵19107-404-when-creating-new-milestone-or-issue-for-project-that-has-issues-disabledblackst0ne2017-05-301-1/+7
| | | | | | | | issues/merge requests feature enabled
| * Enable the Style/TrailingCommaInArguments copRémy Coutable2017-05-101-1/+1
| | | | | | | | | | | | Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Enable the Style/TrailingCommaInLiteral copRémy Coutable2017-05-101-1/+1
| | | | | | | | | | | | Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Merge branch '12910-uploader-pers-snippet' into 'master' Sean McGivern2017-05-041-1/+1
| |\ | | | | | | | | | | | | Prepare uploaders for personal snippets comments See merge request !11022
| | * Support uploaders for personal snippets comments12910-uploader-pers-snippetJarka Kadlecova2017-05-021-1/+1
| | |
| * | Expose project statistics on single requests via the APIMark Fletcher2017-05-031-5/+9
| |/ | | | | | | | | | | + 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
| * Replace builds_enabled with jobs_enabled in projects API v4 (!10786)winniehell2017-04-201-2/+5
| |
| * Separate CE params on Grape APIOswaldo Ferreira2017-04-101-8/+28
| |
| * ProjectsFinder should handle more optionsJacopo2017-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Add `requirements: { id: %r{[^/]+} }` for all projects and groups namespaced ↵Rémy Coutable2017-03-161-1/+1
| | | | | | | | | | | | API routes Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Rename query parameter to `membership`28865-filter-by-authorized-projects-in-v4Toon Claes2017-03-031-1/+2
| | | | | | | | The query parameter `membership` should be more self-explaining.
| * Use string based `visibility` getter & setterToon Claes2017-03-021-4/+4
| | | | | | | | | | | | Add `visibility` & `visibility=` methods to the `Gitlab::VisibilityLevel` module so the `visibility_level` can be get/set with a string value.
| * Expose Project's & ProjectSnippet's VisibilityLevel as StringToon Claes2017-03-021-10/+6
| | | | | | | | | | | | | | | | | | | | 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.
| * Update occurrences of MWBS to MWPSfix/mwbs-to-mwpsJames Lopez2017-03-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Merge branch '6073_project_api' into 'master' Sean McGivern2017-02-281-1/+2
| |\ | | | | | | | | | | | | | | | | | | API project create: Make name or path required Closes #6073 See merge request !9416
| | * API project create: Make name or path requiredJarka Kadlecova2017-02-271-1/+2
| | |
| * | Return 204 for delete endpointsRobert Schilling2017-02-281-1/+0
| |/
| * Return 202 with JSON body on async removals on V4 API3874-correctly-return-json-on-delete-responsesOswaldo2017-02-231-0/+2
| |
| * Enable Style/MultilineArrayBraceLayoutDouwe Maan2017-02-231-1/+2
| |
| * Enable Style/SpaceInsideBracketsDouwe Maan2017-02-231-1/+1
| |
| * Add housekeeping endpoint for Projects APIMark Fletcher2017-02-221-0/+13
| |
| * API: Moved `DELETE /projects/:id/star` to `POST /projects/:id/unstar`api-star-restfulRobert Schilling2017-02-201-1/+1
| |
| * API: Consolidate /projects endpointToon Claes2017-02-141-55/+4
| | | | | | | | | | | | | | | | | | | | | | It consolidates these endpoints: - /projects - /projects/owned - /projects/visible - /projects/starred - /projects/all Into the /projects endpoint using query parameters.
| * Move /projects/fork/:id to /projects/:id/fork14492-change-fork-endpointOswaldo Ferreira2017-02-131-1/+1
| |
| * API: remove `public` param for projectsToon Claes2017-02-071-15/+4
| | | | | | | | | | | | | | | | | | The create and edit actions for projects had these parameters: - `public` (optional) - if true same as setting `visibility_level = 20` - `visibility_level` (optional) Remove the `public` parameter to avoid contradiction.
| * Unify projects search by removing /projects/:search endpointOswaldo Ferreira2017-01-301-16/+0
| |