summaryrefslogtreecommitdiff
path: root/lib/api/issues.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable frozen string in lib/api and lib/backupgfyoung2018-09-291-0/+2
| | | | | | | | | | 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
* Disable existing offenses for the CodeReuse copsYorick Peterse2018-09-111-0/+10
| | | | | This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop.
* Use policies to determine if attributes can be set in the APISean McGivern2018-08-221-5/+2
| | | | This is more idiomatic than checking membership explicitly.
* Allow date parameters on Issues and Notes API for group ownersFlorent Dubois2018-08-221-3/+3
| | | | | | | - Allow `created_at` and `updated_at` parameters on Issues API - Allow `created_at` on Issue Notes API Closes gitlab-org/gitlab-ce#40059
* Resolve "Allow issue's Internal ID (`iid`) to be set when creating via the API"Jamie Schembri2018-08-011-1/+5
|
* Remove N+1 query for author in issues APIsh-add-uncached-query-limiterStan Hu2018-06-041-1/+1
| | | | | | | This was being masked by the statement cache because only one author was used per issue in the test.. Also adds support for an Rspec matcher `exceed_all_query_limit`.
* Eliminate cached N+1 queries for projects in Issue APIStan Hu2018-05-311-1/+1
| | | | | | | | | | | | | | | | | | In CE, every `Issue` entity is also a `ProjectEntity`, which calls `entity&.project.try(:id)` to show the project ID. In an API request with 100 issues, this would hit the Rails statement cache 100 times for the same project and cause unnecessary overhead as related models would also be loaded. In EE, we call `Issue#supports_weight?` for each issue, which then calls `project&.feature_available?(:issue_weights)`. If the project is not preloaded, this incurs additional overhead, as each individual Project object has to be queried. This can lead to a significant performance hit. In loading the CE project with 100 issues, this contributed to at least 22% of the load time. See https://gitlab.com/gitlab-org/gitlab-ce/issues/47031 for why testing this is a bit tricky.
* Merge branch '44799-api-naming-issue-scope' into 'master'Rémy Coutable2018-05-211-4/+5
|\ | | | | | | | | | | | | Resolve "API naming for issue scope" Closes #44799 See merge request gitlab-org/gitlab-ce!18935
| * Add created_by_me and assigned_to_me scopes44799-api-naming-issue-scopeMark Chao2018-05-211-4/+5
| | | | | | | | Deprecate corresponding dash versions created-by-me and assigned-to-me
* | Remove authentication for readonly endpoints in issues APIhaseeb2018-05-151-1/+2
|/
* Resolve "Make a Rubocop that forbids returning from a block"🙈 jacopo beschi 🙉2018-04-181-1/+1
|
* Include subgroup issues when searching for group issues using the APIissue_42443Felipe Artur2018-04-051-1/+1
|
* Adds updated_at filter to issues and merge_requests APIJacopo2018-03-051-0/+2
|
* Track and act upon the number of executed queriesquery-countsYorick Peterse2018-02-011-0/+6
| | | | | | | | | | | 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.
* Adds Rubocop rule for line break around conditionals🙈 jacopo beschi 🙉2018-01-111-0/+1
|
* API: get participants from merge_requests & issuesBrent Greeff2018-01-051-0/+13
|
* Employ declared_params in finder methods for MR and Issue API listsMark Fletcher2017-12-201-1/+1
| | | | - Ensure that unwanted params are no passed to actual finder classes
* Merge branch 'issue_30663' into 'security-10-2'Sean McGivern2017-12-081-0/+2
| | | | | | | | | Prevent creating issues through API without having permissions See merge request gitlab/gitlabhq!2225 (cherry picked from commit c298bbaa88883343dc9cbbb6abec0808fb3b546c) 915b97c5 Prevent creating issues through API without having permissions
* Create issue and merge request destroy servicesGeorge Andrinopoulos2017-11-251-1/+3
|
* Fail when issuable_meta_data is called on an unlimited collectionfix-issues-api-list-performanceSean McGivern2017-11-071-6/+6
| | | | | | | | | | | | | | This method can be called with an array, or a relation: 1. Arrays always have a limited amount of values, so that's fine. 2. If the relation does not have a limit value applied, then we will load every single object in that collection, and prevent N+1 queries for the metadata for that. But that's wrong, because we should never call this without an explicit limit set. So we raise in that case, and this commit will see which specs fail. The only failing specs here were the issues API specs, and the specs for IssuableMetadata itself, and both have been addressed.
* Create system notes for MR too, improve doc + clean up codeJarka Kadlecova2017-09-141-1/+1
|
* Support discussion lock in the APIJarka Kadlecova2017-09-141-1/+2
|
* Add my_reaction_emoji param to /issues APIHiroyuki Sato2017-09-051-0/+1
|
* API: Use defined project requirementsrs-api-use-project-requirementsRobert Schilling2017-08-311-2/+2
|
* Merge branch '28453-add-time-estimate-time-spent-to-api-issue-output' into ↵Robert Speicher2017-08-301-3/+25
|\ | | | | | | | | | | | | | | | | 'master' Add time stats to Issue and Merge Request API Closes #28453 See merge request !13335
| * Add time stats to issue and merge request API end pointsTravis Miller2017-08-291-11/+17
| |
| * Resolve new N+1 by adding preloads and metadata to issues end pointsTravis Miller2017-08-291-3/+19
| |
* | Conditionally destroy a ressourceRobert Schilling2017-08-281-3/+1
| |
* | API: Respect the 'If-Unmodified-Since' for delete endpointsRobert Schilling2017-08-281-0/+2
|/
* Modify/add some forgotten issues API documentationtc-api-root-merge-requestsToon Claes2017-07-281-2/+2
| | | | Should have been part of !13004.
* Merge branch 'tc-issue-api-assignee' into 'master'Sean McGivern2017-07-271-1/+7
|\ | | | | | | | | | | | | Add author_id & assignee_id param to /issues API Closes #29430 See merge request !13004
| * Allow query param scope for /issues API endpointtc-issue-api-assigneeToon Claes2017-07-241-4/+5
| |
| * Add author_id & assignee_id param to /issues APIToon Claes2017-07-241-0/+5
| | | | | | | | Allow issues filtering on `author_id` and `assignee_id`.
* | Resolve "More RESTful API: include resource URLs in responses"Oswaldo Ferreira2017-07-251-1/+1
|/
* Update grape gemdz-update-grapeDmitriy Zaporozhets2017-07-201-0/+1
| | | | | | | | 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>
* refactor code based on feedbackJames Lopez2017-07-061-2/+1
|
* add user agent details API endpoints to issues and snippetsJames Lopez2017-07-061-0/+17
|
* add since and until params to issuablesKyle Bishop2017-06-181-0/+2
|
* Backport of multiple_assignees_feature [ci skip]Valery Sizov2017-05-041-2/+7
|
* Merge branch '26437-closed-by' into 'master' Rémy Coutable2017-04-261-0/+15
|\ | | | | | | | | | | | | Add issues/:iid/closed_by api endpoint Closes #26437 See merge request !10511
| * Add issues/:iid/closed_by api endpointmhasbini2017-04-121-0/+15
| |
* | Port 'Add user activities API' to CESean McGivern2017-04-141-1/+1
| | | | | | | | CE port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/962
* | Separate CE params on Grape APIOswaldo Ferreira2017-04-101-1/+5
|/
* Add "search" optional param and docs for V430195-document-search-param-on-apiOswaldo Ferreira2017-04-051-0/+1
| | | | Notice that this param is being supported since V3, but we have not added the proper docs for it
* Fix API group/issues default state filterAlexander Randa2017-03-281-2/+2
|
* Return 404 in project issues API endpoint when project cannot be foundAdam Niedzielski2017-03-201-1/+1
| | | | Closes #29631
* Add `requirements: { id: %r{[^/]+} }` for all projects and groups namespaced ↵Rémy Coutable2017-03-161-2/+2
| | | | | | API routes Signed-off-by: Rémy Coutable <remy@rymai.me>
* Rename variableBob Van Landuyt2017-03-131-2/+2
| | | | | merge_request_for_resolving_discussions -> merge_request_to_resolve_discussions_of
* Always require MR-iid for resolving discussionsBob Van Landuyt2017-03-131-12/+1
| | | | | And deduplicate the finding of MR's & discussions. Now the searching is done in the service, istead of the controller & the API.
* Delegate a single discussion to a new issueBob Van Landuyt2017-03-131-0/+7
| | | | | | Delegate a discussion in a merge request into a new issue. The discussion wil be marked as resolved and a system note will be added linking to the newly created issue.