Commit Graph

31 Commits

Author SHA1 Message Date
🙈 jacopo beschi 🙉 c6b1043e9d Resolve "Make a Rubocop that forbids returning from a block" 2018-04-18 09:19:40 +00:00
Yorick Peterse cca61980d5
Track and act upon the number of executed queries
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.
2018-02-01 17:00:46 +01:00
Robert Schilling 6a2ee0968e API: Use defined project requirements 2017-08-31 14:57:47 +02:00
Robert Schilling e80313f9ee Conditionally destroy a ressource 2017-08-28 16:40:25 +02:00
Robert Schilling 998afa5f74 API: Respect the 'If-Unmodified-Since' for delete endpoints 2017-08-28 16:40:25 +02:00
Shinya Maeda 56418e85ac init 2017-07-28 18:13:29 +09:00
Kamil Trzciński ac948684fc Merge branch '30634-protected-pipeline' into 'master'
Implement "Block pipelines on protected branches"

Closes #30634, #34616, and #33130

See merge request !11910
2017-07-25 15:04:23 +00:00
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
Lin Jen-Shin e9862a9900 Use struct instead of hash 2017-07-20 20:17:42 +08:00
Lin Jen-Shin a05bc477b9 Use hash to return multiple objects 2017-07-20 00:08:34 +08:00
Lin Jen-Shin e86e1e515a Try to report why it's failing and fix tests 2017-06-06 21:19:07 +08:00
George Andrinopoulos de518e1247 Allow dot in branch name in trigger/builds endpoint in API 2017-03-20 12:49:31 +00: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
Kamil Trzcinski d5f7060400
Rename `/take` to `/take_ownership`, expose `owner` in `v3`. 2017-03-06 12:00:15 +01:00
Kamil Trzcinski 140b51ce98
Introduce tests for pipeline triggers 2017-03-05 20:58:08 +01:00
Kamil Trzcinski c33f09d254
Update triggers API 2017-03-05 18:49:30 +01:00
Robert Schilling 86c58687b2 Return 204 for delete endpoints 2017-02-28 08:32:38 +01:00
Robert Schilling bff14cedf3 Simplyfy variables validation in triggers API 2017-02-24 11:24:40 +01:00
Robert Schilling 74c8669b0a Use the pagination helper in the API 2016-12-04 18:11:19 +01:00
Rémy Coutable 304163becb
API: Use `#find_project` in API::Triggers and API::Services
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-24 13:22:38 +01:00
Dmitry Poray ff8194e0ec Add ref parameter for triggerring builds with gitlab webhook from other project. 2016-11-15 17:19:33 +03:00
Robert Schilling 2965883e60 Grapify token API 2016-11-10 12:48:44 +01:00
Kamil Trzcinski 055afab5c7 Make the CI permission model simpler
This MR simplifies CI permission model:
- read_build: allows to read a list of builds, artifacts and trace
- update_build: allows to cancel and retry builds
- create_build: allows to create builds from gitlab-ci.yml (not yet implemented)
- admin_build: allows to manage triggers, runners and variables
- read_commit_status: allows to read a list of commit statuses (including the overall of builds)
- create_commit_status: allows to create a new commit status using API

Remove all extra methods to manage permission.
Made all controllers to use explicitly the new permissions.
2016-02-02 09:18:08 +01:00
Tomasz Maczukin d44653da1f Add some fixes after review 2016-01-13 12:20:59 +01:00
Tomasz Maczukin e0ec69d919 Change 'trigger_id' to 'token' as resource ID in triggers API 2016-01-07 18:48:33 +01:00
Tomasz Maczukin 8675664655 Get show details feature to triggers API 2016-01-05 12:25:16 +01:00
Tomasz Maczukin 49c8bf4e9b Add create feature to triggers API 2016-01-05 11:47:54 +01:00
Tomasz Maczukin f00607431c Add delete feature to triggers API 2016-01-05 11:32:21 +01:00
Tomasz Maczukin d9da81f736 Add triggers feature to API 2016-01-04 16:44:09 +01:00
Kamil Trzcinski 3578153d3e Fix triggers tests 2015-12-11 18:02:09 +01:00
Kamil Trzcinski 3d9ce37a48 Reimplement Trigger API 2015-12-11 18:02:09 +01:00