Commit Graph

117 Commits

Author SHA1 Message Date
Valery Sizov 0cfe35f727 Multiple issue assignee: CE restriction for multiple assignees 2017-05-05 18:55:16 +03:00
Valery Sizov b0a9a7cf5e [Multiple issue assignee]: reslving some conflicts 2017-05-04 17:22:24 +03:00
Valery Sizov 387c4b2c21 Backport of multiple_assignees_feature [ci skip] 2017-05-04 17:11:53 +03:00
Zeger-Jan van de Weg 6f5b579f94 Use rspec-set to speed up examples 2017-04-26 14:46:26 +00:00
Rémy Coutable f8f49cf516 Merge branch '26437-closed-by' into 'master'
Add issues/:iid/closed_by api endpoint

Closes #26437

See merge request !10511
2017-04-26 11:45:10 +00:00
Jacopo ff76adb547 Unnecessary "include WaitForAjax" and "include ApiHelpers"
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs.
Removed unnecessary usage of `api:true`
2017-04-21 22:32:02 +02:00
mhasbini 327e344417 Add issues/:iid/closed_by api endpoint 2017-04-12 14:38:00 +03:00
Luke "Jared" Bennett 9cee280d70
Merge branch 'update-droplab-to-webpack-version' into new-resolvable-discussion 2017-04-06 13:47:52 +01:00
Oswaldo Ferreira 7cb907cc77 Add "search" optional param and docs for V4
Notice that this param is being supported since V3, but we have not added the proper docs for it
2017-04-05 13:50:12 -03:00
Douwe Maan 9c30b0e918
Fix some specs 2017-04-05 17:44:14 +01:00
Rémy Coutable 58fe40fbd3 Don't use FFaker in factories, use sequences instead
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-03 18:54:48 +02:00
Alexander Randa c4be3460c2 Fix API group/issues default state filter 2017-03-28 17:43:55 +03:00
Adam Niedzielski 8ab347b392 Return 404 in project issues API endpoint when project cannot be found
Closes #29631
2017-03-20 18:03:29 +01:00
Toon Claes 670427cdde Put the use of "No Label" in the description
To get the issues that have no label, the special keyword `No Label`
can be used. This `No Label` label can be used like any other label.
2017-03-16 13:54:49 +01:00
Bob Van Landuyt ea70a0d674 Rename variable
merge_request_for_resolving_discussions ->
merge_request_to_resolve_discussions_of
2017-03-13 08:27:52 +01:00
Bob Van Landuyt f86928953d Always require MR-iid for resolving discussions
And deduplicate the finding of MR's & discussions. Now the searching
is done in the service, istead of the controller & the API.
2017-03-13 08:27:51 +01:00
Bob Van Landuyt 0267b83898 Delegate a single discussion to a new issue
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.
2017-03-13 08:27:51 +01:00
Timothy Andrew 6384bf7a88
Implement review comments from @dbalexandre
- Typo in docs
- Newline between test/expectation in `api/issues_spec`
- Use `find_by` instead of `reference_by` in the structure defining awardables
2017-03-07 13:56:00 +05:30
Timothy Andrew dd99622347
API routes referencing a specific issue should use the issue `iid`
- As opposed to the issue `id` that was previously being used.
- This brings the API routes closer to the web interface's routes.
- This is specific to API v4.
2017-03-07 13:06:42 +05:30
Adam Niedzielski c727d4328f Remove "subscribed" field from API responses returning list of issues or merge requests 2017-03-06 14:17:07 +01:00
Sean McGivern d77bf0ed71 Merge branch '28257-issues-iids' into 'master'
API issues - support filtering by iids

Closes #28257

See merge request !9541
2017-03-02 10:57:17 +00:00
Jarka Kadlecova c6181f9799 API issues - support filtering by iids 2017-03-01 07:28:10 +01:00
Robert Schilling 86c58687b2 Return 204 for delete endpoints 2017-02-28 08:32:38 +01:00
Douwe Maan 7d4b52b27d Enable Style/WordArray 2017-02-23 09:32:41 -06:00
Sean McGivern 99d0bc3d55 Merge branch 'api-subscription-restful' into 'master'
API: Make subscription API more RESTfuL

Closes #28327

See merge request !9325
2017-02-22 11:29:53 +00:00
Robert Schilling 55f2425a67 API: Make subscription API more RESTfuL 2017-02-21 17:44:44 +01:00
Oswaldo Ferreira 2ace39f242 Spam check and reCAPTCHA improvements 2017-02-21 13:32:49 -03:00
Oswaldo Ferreira c2426b4eac Unify issues search behavior by always filtering when ALL labels matches 2017-02-20 13:21:22 -03:00
Robert Schilling c70dfbc686 Add a custom pagination matcher 2017-02-16 15:38:40 +01:00
Robert Speicher b0f5d1a9b9 Merge branch 'traits-for-featurs' into 'master'
Add traits for ProjectFeatures to Project factory

Closes #24007

See merge request !8925
2017-02-06 17:00:46 +00:00
Oswaldo Ferreira c2d64d6702 Remove deprecated MR and Issue endpoints and preserve V3 namespace 2017-02-06 10:12:20 -02:00
Semyon Pupkov 3deb66ea56 Add traits for ProjectFeatures to Project factory
https://gitlab.com/gitlab-org/gitlab-ce/issues/24007
2017-02-05 13:11:45 +05:00
Robert Speicher f1568d71f0 Merge branch 'use-empty_project-factory-in-api-specs' into 'master'
Replace many :project with :empty_projects in API specs

See merge request !8608
2017-01-19 19:07:41 +00:00
Ruben Davila 0f3c9355c1 Add some API endpoints for time tracking.
New endpoints are:

POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/time_estimate"

POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/reset_time_estimate"

POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/add_spent_time"

POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/reset_spent_time"

GET  :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/time_stats"
2017-01-18 10:48:16 -06:00
Rémy Coutable 9c560b5cdf
Replace many :project with :empty_projects in API specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-17 11:41:27 -05:00
Sean McGivern 52afe46380 Only escape the 'No Milestone' param
This is less invasive than the parent commit.
2017-01-13 10:07:56 +00:00
David Eisner 7ef1c6408e API: Implement project issues iid param with IssuesFinder and add tests
- Use IssuesFinder for the /issues API resouce
- Tests for iid filter in project issues API resource
- Tests for No Milestone filter in issues API resources
  The "No Milestone" case was not previously tested, and the `/issues`
  resource did not support the the `milestone` parameter.
- Return issues where all labels match from the issues and project issues
  API resources, like the group issues resource already does. See
  https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6825#note_17474533

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-12 17:51:06 -05:00
Robert Schilling 5961d14292 Fix state_event parameter to reopen an issue 2016-12-22 09:41:53 +01:00
Robert Schilling 3e7818e93a Grapify the issues API 2016-12-07 10:19:28 +01:00
Bob Van Landuyt 1123057ab7 Feature: delegate all open discussions to Issue
When a merge request can only be merged when all discussions are
resolved. This feature allows to easily delegate those discussions to a
new issue, while marking them as resolved in the merge request.

The user is presented with a new issue, prepared with mentions of all
unresolved discussions, including the first unresolved note of the
discussion, time and link to the note.

When the issue is created, the discussions in the merge request will get
a system note directing the user to the newly created issue.
2016-12-05 20:55:45 +01:00
Rémy Coutable c8fb6f6f37 Merge branch 'update-api-spec-files' into 'master'
Update  API spec files to describe the correct class by changing `API::API` to the corresponding class, for example `API::AwardEmoji`.

Closes #24902

See merge request !7718
2016-12-02 09:38:11 +00:00
Robert Speicher 819f459b69 Only include EmailHelpers in mailer specs and specs using them 2016-12-01 12:17:33 +08:00
Douwe Maan 3bf34face4 Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security'
Replace issue access checks with use of IssuableFinder

Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867

## Which fixes are in this MR?

⚠️ - Potentially untested  
💣 - No test coverage  
🚥 - Test coverage of some sort exists (a test failed when error raised)  
🚦 - Test coverage of return value (a test failed when nil used)  
 - Permissions check tested

### Issue lookup with access check

Using `visible_to_user` likely makes these security issues too. See [Code smells](#code-smells).

- [x] 🚦 app/finders/notes_finder.rb:15 [`visible_to_user`]
- [x] 🚥 app/views/layouts/nav/_project.html.haml:73 [`visible_to_user`] [`.count`]
- [x]  app/services/merge_requests/build_service.rb:84 [`issue.try(:confidential?)`]
- [x]  lib/api/issues.rb:112 [`visible_to_user`]
  - CHANGELOG: Prevented API returning issues set to 'Only team members' to everyone
- [x]  lib/api/helpers.rb:126 [`can?(current_user, :read_issue, issue)`] Maybe here too?
- [x]  lib/gitlab/search_results.rb:53 [`visible_to_user`]

### Previous discussions
- [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b2ff264eddf9819d7693c14ae213d941494fe2b3_128_126
- [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#7b6375270d22f880bdcb085e47b519b426a5c6c7_87_87

See merge request !2031
2016-11-28 21:26:23 -03:00
Douwe Maan 3d7704ae5f Merge branch 'zj-fix-label-creation-non-members' into 'security'
Fix label creation non members

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23416

See merge request !2006
2016-11-28 21:24:19 -03:00
Livier eb4f15571d Changed API spec files to describe the correct class
Restore changes for api spec files

Fix error in rspec Users

Delete extra space Repositories-spec
2016-11-28 10:55:27 -07:00
Douglas Barbosa Alexandre 0c052f116c Remove default value for `project` argument on subscribable concern 2016-11-17 15:10:13 -02:00
Nick Thomas bfb20200e9 Add a be_like_time matcher and use it in specs
The amount of precision times have in databases is variable, so we need
tolerances when comparing in specs. It's better to have the tolerance defined
in one place than several.
2016-10-17 14:44:20 +01:00
Paco Guzman b7814205dc Ensure specs on sorting of issues in API are deterministic on MySQL
MySQL could not have support for millisecond precision, depends on the MySQL version 
so we just create issues in different seconds in a deterministic way
2016-09-12 15:44:41 +02:00
Sean McGivern 45fc8b73ed Fix API issues sorting 2016-09-09 16:10:01 +01:00
Robert Schilling 036cc8c27e API: Expose issue#confidential 2016-08-31 09:20:04 +02:00