Commit graph

27 commits

Author SHA1 Message Date
Rémy Coutable
3a2abc1d50
Enable the Layout/ExtraSpacing cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-24 13:05:45 +01:00
Imre Farkas
b1e070bf49
Fix API::Namespaces to accept namepaces with dots
It also renames the API::PROJECT_ENDPOINT_REQUIREMENTS constant to
API::NAMESPACE_OR_PROJECT_REQUIREMENTS
2018-11-28 12:54:11 +01:00
gfyoung
3836d69119 Enable frozen string in lib/api and lib/backup
Partially addresses #47424.

Had to make changes to spec files because
stubbing methods on frozen objects is a mess
in RSpec and leads to failures:

https://github.com/rspec/rspec-mocks/issues/1190
2018-09-29 21:04:50 -07:00
Yorick Peterse
2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
🙈 jacopo beschi 🙉
c6b1043e9d Resolve "Make a Rubocop that forbids returning from a block" 2018-04-18 09:19:40 +00:00
Robert Schilling
6a2ee0968e API: Use defined project requirements 2017-08-31 14:57:47 +02:00
Robert Schilling
dcd4ea473c Update remaining endpoints 2017-08-28 17:10:30 +02: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
d9435d6121 Backports for ee-2112
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2112
2017-07-06 16:25:03 +08:00
Lin Jen-Shin
01960fce25 Fix optional args for POST :id/variables
Always use declared_params(include_missing: false)
so that we don't give nils for optional arguments
2017-06-27 15:20:11 +08:00
Lin Jen-Shin
bd66bf08b5 API and doc for protected variables 2017-05-25 19:49:46 +08: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
c280acb00b Backport API to V3 2017-02-28 08:32:39 +01:00
Robert Schilling
86c58687b2 Return 204 for delete endpoints 2017-02-28 08:32:38 +01:00
Robert Schilling
9dfbfbb2d1 Don't convert data which already is the target type 2016-11-24 13:35:26 +01:00
Semyon Pupkov
77cf855bb9 Define common helper for describe pagination params in api 2016-11-22 09:19:26 +05:00
Z.J. van de Weg
3d6f18cec5 GrapeDSL for variables 2016-10-13 09:55:50 +02: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
9e701ccd48 Fix some typos 2016-01-13 18:47:39 +01:00
Tomasz Maczukin
df54828580 Add some fixes after review 2016-01-13 12:47:11 +01:00
Tomasz Maczukin
b60c146267 Change :variable_id to :key as resource ID in API 2016-01-07 13:49:38 +01:00
Tomasz Maczukin
16bd4df083 Fix a typo in method description 2015-12-31 22:59:06 +01:00
Tomasz Maczukin
937567b767 Add create feature to variables API 2015-12-31 22:30:07 +01:00
Tomasz Maczukin
c5177dd5e2 Add missing 'not_found' checks in variables API 2015-12-31 17:03:11 +01:00
Tomasz Maczukin
0d014feb1d Add delete feature to variables API 2015-12-31 16:56:03 +01:00
Tomasz Maczukin
a692ce1c07 Add update feature for variables API 2015-12-31 16:26:55 +01:00
Tomasz Maczukin
ea4777ff50 Add features for list and show details of variables in API 2015-12-31 16:26:54 +01:00