Commit graph

29 commits

Author SHA1 Message Date
Dmitriy Zaporozhets
6b8ad689da
Update grape gem
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>
2017-07-20 16:33:18 +03:00
blackst0ne
11aff97d88 Remove the User#is_admin? method 2017-04-09 13:20:57 +11:00
Rémy Coutable
63360adeae
Add requirements: { id: %r{[^/]+} } for all projects and groups namespaced API routes
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-16 18:00:24 +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
Lin Jen-Shin
c1a37c6032 Use UpdateRunnerService to update runner in API:
TODO: Add tests to make sure controllers and API
would tick the queue.
2017-02-08 22:29:44 +08:00
Robert Schilling
74c8669b0a Use the pagination helper in the API 2016-12-04 18:11:19 +01:00
Robert Schilling
510092c83a Use #to_h to convert params to a hash 2016-11-14 11:17:51 +01:00
Robert Schilling
3378642504 Grapify runners API 2016-11-10 11:09:08 +01:00
Lin Jen-Shin
9cf45b0586 Return the association and check it in controller instead:
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4641#note_12444891
2016-06-14 23:11:43 +08:00
Lin Jen-Shin
6c500034f4 Merge branch 'prefer-assign_to' into feature/runner-lock-on-project
* prefer-assign_to:
  Give 409 Conflict whenever the runner was already enabled
  We're checking return value rather than rescuing exceptions
  Prefer Runner#assign_to instead of creating directly
2016-06-14 23:05:33 +08:00
Lin Jen-Shin
1b8f52d920 Avoid enabling locked runners. Give 403 in this case 2016-06-14 22:58:38 +08:00
Lin Jen-Shin
f74f423860 Give 409 Conflict whenever the runner was already enabled 2016-06-14 22:25:11 +08:00
Lin Jen-Shin
5f887344c0 Prefer Runner#assign_to instead of creating directly 2016-06-14 16:36:54 +08:00
Lin Jen-Shin
1c302d566b WIP, try to add views for locked runners 2016-06-09 16:00:24 +08:00
Grzegorz Bizon
da8b72d453 Extend runner options that are configurable via API 2016-05-19 22:01:53 +02:00
Tomasz Maczukin
b36116f9ad Move :runner_id param to POST body when enabling specific runner in project 2016-02-19 13:18:48 +01:00
Tomasz Maczukin
d1ac00aea3 Modify and fix output of delete and update of a runner 2016-02-19 13:18:48 +01:00
Tomasz Maczukin
24eed1c5c1 Modify runner projects selecting method in runners API 2016-02-19 13:18:48 +01:00
Tomasz Maczukin
36e7ffea5d Fix runners filtering 2016-02-19 13:18:47 +01:00
Tomasz Maczukin
f21b15d5f5 Limit projects to user available projects if user is not an admin 2016-02-19 13:18:47 +01:00
Tomasz Maczukin
b58744cd93 Modify authentication check methods in runners API 2016-02-19 13:18:47 +01:00
Tomasz Maczukin
553bac57d0 Add token to runner details output in API 2016-02-19 13:18:47 +01:00
Tomasz Maczukin
81ced6f55b Split /runners entrypoint to /runners and /runners/all 2016-02-19 13:18:47 +01:00
Tomasz Maczukin
b56ee397bb Add some fixes in runners API documentation 2016-02-19 13:18:46 +01:00
Tomasz Maczukin
53f775ae6d Fix runners filtering in API 2016-02-19 13:18:46 +01:00
Tomasz Maczukin
8c37f0ff30 Add missing methods documentation; fix rubocop reported violation 2016-02-19 13:18:46 +01:00
Tomasz Maczukin
d42ced44d9 Add feature to enable/disable runner in project 2016-02-19 13:18:46 +01:00
Tomasz Maczukin
128be3c010 Add basic runners management API
- add feature to list runners
- add feature to show runners details
- add feature to delete runner
- add feature to update runner
2016-02-19 13:18:46 +01:00