Skip to content
代码片段 群组 项目
提交 7fe07a79 编辑于 作者: Laura Montemayor's avatar Laura Montemayor 提交者: charlie ablett
浏览文件

Move masked and raw from interface into types

上级 2b37d016
No related branches found
No related tags found
无相关合并请求
......@@ -11,6 +11,12 @@ class GroupVariableType < BaseObject
field :environment_scope, GraphQL::Types::String, null: true,
description: 'Scope defining the environments that can use the variable.'
field :protected, GraphQL::Types::Boolean, null: true,
description: 'Indicates whether the variable is protected.'
field :masked, GraphQL::Types::Boolean, null: true,
description: 'Indicates whether the variable is masked.'
end
end
end
......@@ -16,6 +16,12 @@ class InstanceVariableType < BaseObject
},
description: 'Scope defining the environments that can use the variable.'
field :protected, GraphQL::Types::Boolean, null: true,
description: 'Indicates whether the variable is protected.'
field :masked, GraphQL::Types::Boolean, null: true,
description: 'Indicates whether the variable is masked.'
def environment_scope
nil
end
......
......@@ -10,7 +10,13 @@ class ProjectVariableType < BaseObject
implements(VariableInterface)
field :environment_scope, GraphQL::Types::String, null: true,
description: 'Scope defining the environments that can use the variable.'
description: 'Scope defining the environments that can use the variable.'
field :protected, GraphQL::Types::Boolean, null: true,
description: 'Indicates whether the variable is protected.'
field :masked, GraphQL::Types::Boolean, null: true,
description: 'Indicates whether the variable is masked.'
end
end
end
......@@ -17,13 +17,7 @@ module VariableInterface
description: 'Value of the variable.'
field :variable_type, ::Types::Ci::VariableTypeEnum, null: true,
description: 'Type of the variable.'
field :protected, GraphQL::Types::Boolean, null: true,
description: 'Indicates whether the variable is protected.'
field :masked, GraphQL::Types::Boolean, null: true,
description: 'Indicates whether the variable is masked.'
description: 'Type of the variable.'
field :raw, GraphQL::Types::Boolean, null: true,
description: 'Indicates whether the variable is raw.'
......
......@@ -10187,8 +10187,6 @@ CI/CD variables given to a manual job.
| <a id="cimanualvariableenvironmentscope"></a>`environmentScope` **{warning-solid}** | [`String`](#string) | **Deprecated** in 15.3. No longer used, only available for GroupVariableType and ProjectVariableType. |
| <a id="cimanualvariableid"></a>`id` | [`ID!`](#id) | ID of the variable. |
| <a id="cimanualvariablekey"></a>`key` | [`String`](#string) | Name of the variable. |
| <a id="cimanualvariablemasked"></a>`masked` | [`Boolean`](#boolean) | Indicates whether the variable is masked. |
| <a id="cimanualvariableprotected"></a>`protected` | [`Boolean`](#boolean) | Indicates whether the variable is protected. |
| <a id="cimanualvariableraw"></a>`raw` | [`Boolean`](#boolean) | Indicates whether the variable is raw. |
| <a id="cimanualvariablevalue"></a>`value` | [`String`](#string) | Value of the variable. |
| <a id="cimanualvariablevariabletype"></a>`variableType` | [`CiVariableType`](#civariabletype) | Type of the variable. |
......@@ -21558,8 +21556,6 @@ Implementations:
| ---- | ---- | ----------- |
| <a id="civariableid"></a>`id` | [`ID!`](#id) | ID of the variable. |
| <a id="civariablekey"></a>`key` | [`String`](#string) | Name of the variable. |
| <a id="civariablemasked"></a>`masked` | [`Boolean`](#boolean) | Indicates whether the variable is masked. |
| <a id="civariableprotected"></a>`protected` | [`Boolean`](#boolean) | Indicates whether the variable is protected. |
| <a id="civariableraw"></a>`raw` | [`Boolean`](#boolean) | Indicates whether the variable is raw. |
| <a id="civariablevalue"></a>`value` | [`String`](#string) | Value of the variable. |
| <a id="civariablevariabletype"></a>`variableType` | [`CiVariableType`](#civariabletype) | Type of the variable. |
......@@ -5,5 +5,5 @@
RSpec.describe GitlabSchema.types['CiGroupVariable'] do
specify { expect(described_class.interfaces).to contain_exactly(Types::Ci::VariableInterface) }
specify { expect(described_class).to have_graphql_fields(:environment_scope).at_least }
specify { expect(described_class).to have_graphql_fields(:environment_scope, :masked, :protected).at_least }
end
......@@ -4,4 +4,6 @@
RSpec.describe GitlabSchema.types['CiInstanceVariable'] do
specify { expect(described_class.interfaces).to contain_exactly(Types::Ci::VariableInterface) }
specify { expect(described_class).to have_graphql_fields(:masked, :protected).at_least }
end
......@@ -5,5 +5,5 @@
RSpec.describe GitlabSchema.types['CiProjectVariable'] do
specify { expect(described_class.interfaces).to contain_exactly(Types::Ci::VariableInterface) }
it { expect(described_class).to have_graphql_fields(:environment_scope).at_least }
specify { expect(described_class).to have_graphql_fields(:environment_scope, :masked, :protected).at_least }
end
......@@ -5,7 +5,7 @@
RSpec.describe GitlabSchema.types['CiVariable'] do
specify do
expect(described_class).to have_graphql_fields(
:id, :key, :value, :variable_type, :protected, :masked, :raw
:id, :key, :value, :variable_type, :raw
).at_least
end
end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册