Commit Graph

36 Commits

Author SHA1 Message Date
Alexandru Croitor 09163e423a Expose merge requests count based on user access
Count issues related merge requests based on user access level. And
issue can have related MRs from projects where user does not have
access so the number of related merge requests should be adjusted
based on user's ability to access the related MRs.

https://gitlab.com/gitlab-org/gitlab-ce/issues/59581
2019-06-18 12:46:46 +03:00
Rémy Coutable 6145ddf515
Revert "Merge branch 'revert-04c3c6dd' into 'master'"
This reverts commit 744f1f2e70, reversing
changes made to c4d930e5f5.
2019-05-22 21:47:32 +02:00
Kamil Trzciński 4f20c9de6f Revert "Merge branch 'reorganize-tests-jobs-by-level' into 'master'"
This reverts merge request !27514
2019-05-22 11:45:46 +00:00
Kamil Trzciński 04c3c6dd5a Merge branch 'reorganize-tests-jobs-by-level' into 'master'
Reorganize test jobs by level

See merge request gitlab-org/gitlab-ce!27514
2019-05-22 10:21:38 +00:00
Yoginth 2f6a20ce66 Fix typos in the whole gitlab-ce project 2019-05-20 14:11:44 +00:00
Rémy Coutable 4d9c76e9e4
Reorganize test jobs by level
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-05-20 14:31:58 +02:00
Alexandru Croitor 9ff6edf690 Review updates and cleanup
* Cleaned issues and issues_statistics docs
* Renamed param with_labels_data to with_labels_details
* Added spec for N+1 check when retrieving labels from issue
* Refactoed CheckAssigneesCount validation class
2019-05-17 13:56:25 +03:00
Alexandru Croitor f117c032ac Add params validations and remove extra params support
Remove label_name and milestone_title params support
Add mutually_exclusive validation for author_id and author_username
Add mutually_exclusive validation for assignee_id and assignee_username
Add validation to allow single value for asignee_username on CE
Add separate issue_stats_params helper for statistics params and
reuse in issues_params.
2019-05-15 10:15:17 +03:00
Alexandru Croitor 5ec28dc387 Changes to issues api
When issues_controller endpoint was used for search, the parameters
passed to the controller were slightly different then the ones
passed to API. Because the searchbar UI is reused in different
places and builds the parameters passed to request in same way
we need to account for old parameter names.


Add issues_statistics api endpoints

Adds issue_statistics api endpoints for issue lists and returns
counts of issues for all, closed and opened states.


Expose more label attributes based on a param

When requesting issues list through API expose more attributes
for labels, like color, description if with_labels_data param is
being passed, avoiding this way to change response schema for users
that already use API.

https://gitlab.com/gitlab-org/gitlab-ce/issues/57402
2019-05-15 10:15:16 +03:00
Sean McGivern 00af4c6d6a Allow replying to an individual note in the API
If you can do this in the UI, you should be able to do it in the API. If
a discussion is not a single note discussion, or it is replyable, you
can reply to it.
2019-05-06 19:48:32 +01:00
Rémy Coutable 9e324ded43
Reduce queries in spec/requests/api/merge_requests_spec.rb
This reduces the queries from 97137 to 65136 and the query time from
02:04 to 01:27 in spec/requests/api/merge_requests.rb.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-03-13 17:56:26 +01:00
Alexandru Croitor be3578d245 Add array support for labels
* Support label parameter as comma separated and array of strings
for merge requests and issues api endpoints
2019-03-06 13:28:42 +02:00
Igor Drozdov 5169dafccf Forbid creating discussions for users with restricted access 2019-03-04 18:37:08 +00:00
Nermin Vehabovic b467dca485 Added: Specs for sort page break tie in the merge request list API 2019-02-16 16:57:14 +01:00
Nermin Vehabovic eccfab4445 Added: Specs for sort page breaks on notes 2019-02-16 16:11:31 +01:00
Jasper Maes dc1eb2c5c3 Fix deprecation: Using positional arguments in integration tests 2018-12-22 14:42:41 +01:00
Jasper Maes bf73520079 convert specs in javascripts/ and support/ to new syntax 2018-12-21 10:10:26 +01:00
blackst0ne b44a2c801a Update specs to rails5 format
Updates specs to use new rails5 format.

The old format:
`get :show, { some: params }, { some: headers }`

The new format:
`get :show, params: { some: params }, headers: { some: headers }`
2018-12-19 10:04:31 +11:00
Jacopo c068ac67b3 Filter by `None`/`Any` for labels in issues/mrs API
By using the parameters `?labels=None|Any` the user can filter
issues/mrs from the API that has `none/any` label.

Affected endpoints are:

- /api/issues
- /api/projects/:id/issues
- /api/groups/:id/issues
- /api/merge_requests
- /api/projects/:id/merge_requests
- /api/groups/:id/merge_requests
2018-11-23 16:11:52 +01:00
Douwe Maan 4d23090877
Verify metrics don't introduce new N+1 issue in MR API 2018-11-06 17:18:03 +01:00
Sean McGivern aff7dccc1f Use policies to determine if attributes can be set in the API
This is more idiomatic than checking membership explicitly.
2018-08-22 14:17:29 +01:00
Kia Mei Somabes 37af75a2e0 Resolve "do not set updated_at when creating note" 2018-07-12 09:26:09 +00:00
Chantal Rollison b7e6e4e48b Fixed flaky spec for merge request lists 2018-07-02 09:31:29 -07:00
Chantal Rollison c2b622b2a4 Add locked state to merge request API 2018-06-28 07:12:00 -07:00
Felipe Artur 8ed12efecd Add merge requests list endpoint for groups 2018-05-31 15:29:07 +00:00
Jan Provaznik 7a76caa5a8 Merge request and commit discussions API 2018-05-01 12:39:44 +00:00
Jan Provaznik dcdfa04b32 Add discussion API
* adds basic discussions API for issues and snippets
* reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)
2018-03-07 12:27:50 +01:00
Markus Koller b7cd99c376
Allow including custom attributes in API responses 2018-02-08 13:30:34 +01:00
Brent Greeff 34b9cc9674 API: get participants from merge_requests & issues 2018-01-05 15:21:53 +00:00
Markus Koller 6902848a9c
Support custom attributes on projects 2017-11-06 10:51:46 +01:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Jacopo 26ec874f77 Get Project Branch API shows an helpful error message on invalid refname
In API v4 when requesting a branch with an invalid refname shows an
helpful error message: 'The branch refname is invalid'.
2017-10-18 09:45:27 +02:00
Markus Koller e9eae3eb0d Support custom attributes on users 2017-09-28 16:49:42 +00:00
Robert Schilling ee4820a526 Add a spec when ressource is not modified 2017-08-29 10:12:10 +02:00
Robert Schilling 915dd57fe2 Add tests for the unmodified header 2017-08-28 17:10:34 +02:00
Rémy Coutable 649382b1c2 Fix the /projects/:id/repository/branches endpoint to handle dots in the branch name when the project full patch contains a `/`
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:29:31 +02:00