Commit Graph
254 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets 5a88873e5c Move API contributors logic to repository model 2014-07-02 14:43:23 +03:00
Dmitriy Zaporozhets 81d41c0f92 Collect contributors info via API 2014-07-02 12:40:20 +03:00
Dmitriy Zaporozhets 4967c08786 Fix signup and project visibility
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-30 16:43:32 +03:00
Dmitriy Zaporozhets 2d87556847 Remove rails observers from application 2014-06-17 22:51:43 +03:00
Dmitriy Zaporozhets 47d6f70528 Add /api/users test for admin role. Updated CHANGELOG
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-13 19:42:17 +03:00
Dmitriy Zaporozhets 8ff171f628 Fix api specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-13 19:39:12 +03:00
Dmitriy Zaporozhets ae564c97d4 Dont expose user email via API
To prevent leaking of users info we reduce amount of user information
retrieved via API for normal users.

What user can get via API:

* if not admin: only id, state, name, username and avatar_url
* if admin: all user information
* about himself: all informaion

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-13 17:46:48 +03:00
Dmitriy Zaporozhets d593c98fcb Delete wall notes tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-13 14:29:26 +03:00
Dmitriy Zaporozhets 6fdd900827 Merge pull request #7014 from asedge/api_create_tag
Add CreateTagService.  Use new service to allow tag creation through API.
2014-05-29 15:37:42 +03:00
Dmitriy Zaporozhets 14f78d067d Modify specs for new project transfer code
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-28 19:04:18 +03:00
Sean Edge 28de31f520 Fix broken repositories_spec test for creating new tags. 2014-05-28 11:14:51 -04:00
Sean Edge a8f2977c6a More fixup for HoundCI. Fix up some small issues in docs. 2014-05-27 08:22:04 -04:00
Dmitriy Zaporozhets c7e00aca2d Better specs for Compare API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-27 11:27:42 +03:00
Dmitriy Zaporozhets 10ee137e9c Expose timeout and same_ref compare fields
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-27 11:16:50 +03:00
Sean Edge 435740b8a2 Fixup for HoundCI. 2014-05-26 12:32:01 -04:00
Sean Edge 446e920a1b Add tests for creating tag with API. 2014-05-26 12:30:58 -04:00
Dmitriy Zaporozhets 242291850d Add some tests to compare api
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-26 18:05:55 +03:00
Dmitriy Zaporozhets d575ee3e90 Improve branch deletion via API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-23 15:34:02 +03:00
Jacob Vosmaer 2d8c310f11 Make user access test pass for the right reason
If we do not set a private token during the test, current_user will be
nil because the user is not found, not due to the access check.
2014-05-15 10:30:50 +02:00
Jacob Vosmaer 02b85fd236 Check user access status in API for current_user 2014-05-15 10:22:59 +02:00
Jacob Vosmaer 6d45909f03 Add test for current behavior of current_user 2014-05-15 09:57:21 +02:00
Dmitriy Zaporozhets 1f1c59b61d Merge pull request #6778 from dblessing/feature/mr_labels
Merge Request Labels
2014-05-13 14:43:46 +03:00
Drew Blessing 5f25cdfe19 Implement Merge Request Labels 2014-05-13 06:41:36 -05:00
Dmitriy Zaporozhets 2d2b2da45a More tests for merge api
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-13 13:20:10 +03:00
Dmitriy Zaporozhets ab032256da Add some tests for merge API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-13 11:01:40 +03:00
Timm Friebe 05e792b4c4 Implement GET /users/:uid/keys for admin users
Complements POST operation added in gitlabhq/gitlabhq#3146

Implement DELETE /users/:uid/keys/:id for admin users

Fix "Line is too long. [83/80]"

Use single quotes as advised

Use single quotes as advised

Use single quotes as advised

Fix missing space around { and }

Fix typo in documentation

Only catch  ActiveRecord::RecordNotFound, let other exceptions propagate

Raise a "404 Not found" if key to be deleted cannot be found
As requested by @jvanbaarsen in https://github.com/gitlabhq/gitlabhq/pull/6781#discussion_r11735114

Remove tab
Unconfigured vim on this box, grrrr./
2014-04-18 14:16:19 +02:00
Dmitriy Zaporozhets 53b52b11d5 Merge pull request #6699 from criteo/api_get_open_merge_requests
Add optional parameter to list merge requests
2014-04-13 20:10:39 +03:00
Jeroen van Baarsen 5dd2f36ae1 Added API testing group 2014-04-11 21:45:56 +02:00
Stuart Pook 66209fbc76 Add optional parameter to list merge requests
Add an optional parameter to list merge requests to restrict the
returned merge requests to those that are "opened", "merged" or
"closed". By default all merge requests are returned. Note that
"all" can be given to explicitly request all merge requests.
2014-04-07 16:18:25 +02:00
Dmitriy Zaporozhets 9b6224f99c More test fixes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-03 12:05:21 +03:00
Dmitriy Zaporozhets 33a00ceeea Create branch via API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-01 10:39:53 +03:00
Dmitriy Zaporozhets 9b276f0003 Move branches api to separate class
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-31 16:31:53 +03:00
Dmitriy Zaporozhets 046fa9bdb1 Merge pull request #5469 from NARKOZ/api-pagination-headers
add 'Link' header for API response
2014-03-31 13:46:57 +03:00
Dmitriy Zaporozhets 17fd0e5c72 Merge pull request #6569 from criteo/api_merge_request_comments
Add method to get the comments on a merge request
2014-03-26 10:06:51 +02:00
Dmitriy Zaporozhets f0adf28ed9 Merge branch 'event-create-service' into 'master'
EventCreateService class

The goal is to collect all event creation logic in one place called EventCreateService.
Because now its placed in observers, controllers, services etc
2014-03-26 07:41:27 +00:00
Dmitriy Zaporozhets 535339a6ab Fix tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-25 16:25:59 +02:00
Ábner Silva de Oliveira 85b5812bc2 moving labels specs to projects_spec file 2014-03-22 17:29:13 -03:00
Ábner Silva de Oliveira 44aa6b90dd added api method to return labels of a given project 2014-03-21 06:25:25 -03:00
Stuart Pook 9886998f24 Add method to get the comments on a merge request
Add method to get the comments for a merge request and
document that you can change the status of a merge request.
2014-03-19 19:07:51 +01:00
Robert Speicher 1897fb00b8 Make use of project factory traits 2014-03-19 05:15:24 -04:00
Dmitriy Zaporozhets 928b7f3bff Add tests for API project permissions info
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-17 15:14:27 +02:00
Dmitriy Zaporozhets 7c60713e82 Move project members api to separate file
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-17 13:44:54 +02:00
Greg Messner f84d846223 Added tests of Create and Update MR description. 2014-03-10 12:39:29 -07:00
Dmitriy Zaporozhets 6cf39fe10d Extract commits API to separate file
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-18 12:41:21 +02:00
Dmitriy Zaporozhets ddbe978041 Complete api files CRUD
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-18 12:27:02 +02:00
Dmitriy Zaporozhets 28e13634dc Merge branch 'improve/mr_diff'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	features/steps/project/project_fork.rb
	features/steps/project/project_forked_merge_requests.rb
	features/steps/project/project_issue_tracker.rb
	features/steps/project/project_markdown_render.rb
	features/steps/shared/project.rb
2014-01-23 14:38:23 +02:00
Dmitriy Zaporozhets cee68dec8a Fix api merge request specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-22 21:59:09 +02:00
Dmitriy Zaporozhets c227aa44f9 Make changes to tests
* project_with_code -> project
* project -> ermpty_project

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-22 21:03:52 +02:00
skv a3f645ef51 Remove deprecated finders 2014-01-19 23:39:56 +04:00
Jason Hollingsworth 7cc2520541 Add support for various archive formats.
Used mime-types gem instead of hardcoding content types.
Allow multiple extensions in archive route (.tar.gz, .tar.bz2).
Change content disposition from infile(?) to attachment for api.
Fixed api would return “archive” instead of {project}-{hash}.{ext}
2014-01-02 10:18:56 -06:00