Commit Graph

47 Commits

Author SHA1 Message Date
GitLab Bot 5f4d643165 Add latest changes from gitlab-org/gitlab@master 2021-03-17 09:09:27 +00:00
GitLab Bot 98d7cc758f Add latest changes from gitlab-org/gitlab@master 2020-10-30 18:08:56 +00:00
GitLab Bot 6a0085290e Add latest changes from gitlab-org/gitlab@master 2020-10-15 00:08:42 +00:00
GitLab Bot 9a5dcad39c Add latest changes from gitlab-org/gitlab@master 2020-09-14 12:09:34 +00:00
GitLab Bot d9e07a155e Add latest changes from gitlab-org/gitlab@master 2020-08-18 15:10:33 +00:00
GitLab Bot c787c1559e Add latest changes from gitlab-org/gitlab@master 2020-08-13 18:10:36 +00:00
GitLab Bot 21341457a8 Add latest changes from gitlab-org/gitlab@master 2020-07-08 09:09:17 +00:00
GitLab Bot 777f6da99a Add latest changes from gitlab-org/gitlab@master 2020-06-29 21:09:07 +00:00
GitLab Bot 89a4f4761d Add latest changes from gitlab-org/gitlab@master 2020-06-26 00:09:13 +00:00
GitLab Bot 2e4d8b3449 Add latest changes from gitlab-org/gitlab@master 2020-04-28 03:09:53 +00:00
GitLab Bot f569792df8 Add latest changes from gitlab-org/gitlab@master 2020-04-27 18:09:41 +00:00
GitLab Bot aa0f0e9921 Add latest changes from gitlab-org/gitlab@master 2020-01-16 18:08:46 +00:00
Hordur Freyr Yngvason 5f82ff1469 Bring scoped environment variables to core
As decided in https://gitlab.com/gitlab-org/gitlab-ce/issues/53593
2019-08-08 18:51:52 +00:00
Imre Farkas ba4977ab96 CE port of Move EE specific lines in API::Variables 2019-05-28 10:14:43 +00:00
Thong Kuah ff0ffffd69 Make protected attribute Boolean type
As documented in
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/api/project_level_variables.md#create-variable
and it's a boolean in `db/schema.rb`
2019-05-28 14:26:43 +12:00
Thong Kuah 9c5fa659a5 Masked should be Boolean type
As documented in
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/api/project_level_variables.md#create-variable
and it's a boolean in `db/schema.rb`
2019-05-27 12:42:24 +12:00
Mathieu Parent 00c851384e API: Allow to get and set "masked" attribute for variables 2019-05-22 07:25:26 +02:00
Krasimir Angelov 85609c117e Implement support for CI variables of type file
Add env_var and file as supported types for CI variables. Variables of
type file expose to users existing gitlab-runner behaviour - save
variable value into a temp file and set the path to this file in an ENV
var named after the variable key.

Resolves https://gitlab.com/gitlab-org/gitlab-ce/issues/46806.
2019-05-06 13:11:42 +00:00
Yorick Peterse cbe21d78bf
Backport parameters for API::Parameters
This backports the EE specific parameters for API::Parameters, wrapping
them in a conditional.
2019-03-26 14:18:29 +01:00
Yorick Peterse a7004e2825
Add method to API::Variables for filtering params
This allows EE to customize the parameters used in two places, without
having to modify the source code directly.
2019-03-04 17:44:57 +01:00
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