Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
d9e285a74b
commit
e6de69cc2e
67 changed files with 875 additions and 283 deletions
|
@ -23,39 +23,6 @@ Graphql/Descriptions:
|
|||
- 'ee/app/graphql/types/vulnerability_severity_enum.rb'
|
||||
- 'ee/app/graphql/types/vulnerability_state_enum.rb'
|
||||
- 'ee/app/graphql/types/vulnerability_confidence_enum.rb'
|
||||
- 'app/graphql/mutations/commits/create.rb'
|
||||
- 'app/graphql/mutations/concerns/mutations/assignable.rb'
|
||||
- 'app/graphql/mutations/concerns/mutations/can_mutate_spammable.rb'
|
||||
- 'app/graphql/mutations/concerns/mutations/resolves_subscription.rb'
|
||||
- 'app/graphql/mutations/container_expiration_policies/update.rb'
|
||||
- 'app/graphql/mutations/container_repositories/destroy.rb'
|
||||
- 'app/graphql/mutations/custom_emoji/create.rb'
|
||||
- 'app/graphql/mutations/design_management/base.rb'
|
||||
- 'app/graphql/mutations/design_management/delete.rb'
|
||||
- 'app/graphql/mutations/design_management/move.rb'
|
||||
- 'app/graphql/mutations/design_management/upload.rb'
|
||||
- 'app/graphql/mutations/discussions/toggle_resolve.rb'
|
||||
- 'app/graphql/mutations/environments/canary_ingress/update.rb'
|
||||
- 'app/graphql/mutations/groups/update.rb'
|
||||
- 'app/graphql/mutations/issues/base.rb'
|
||||
- 'app/graphql/mutations/issues/create.rb'
|
||||
- 'app/graphql/mutations/issues/move.rb'
|
||||
- 'app/graphql/mutations/issues/set_due_date.rb'
|
||||
- 'app/graphql/mutations/issues/set_subscription.rb'
|
||||
- 'app/graphql/mutations/issues/update.rb'
|
||||
- 'app/graphql/mutations/jira_import/import_users.rb'
|
||||
- 'app/graphql/mutations/jira_import/start.rb'
|
||||
- 'app/graphql/mutations/labels/create.rb'
|
||||
- 'app/graphql/mutations/merge_requests/accept.rb'
|
||||
- 'app/graphql/mutations/merge_requests/base.rb'
|
||||
- 'app/graphql/mutations/merge_requests/create.rb'
|
||||
- 'app/graphql/mutations/merge_requests/reviewer_rereview.rb'
|
||||
- 'app/graphql/mutations/merge_requests/set_labels.rb'
|
||||
- 'app/graphql/mutations/merge_requests/set_milestone.rb'
|
||||
- 'app/graphql/mutations/merge_requests/set_subscription.rb'
|
||||
- 'app/graphql/mutations/merge_requests/update.rb'
|
||||
- 'app/graphql/mutations/metrics/dashboard/annotations/create.rb'
|
||||
- 'app/graphql/mutations/namespace/package_settings/update.rb'
|
||||
- 'app/graphql/mutations/notes/base.rb'
|
||||
- 'app/graphql/mutations/notes/create/base.rb'
|
||||
- 'app/graphql/mutations/notes/create/note.rb'
|
||||
|
|
|
@ -42,7 +42,7 @@ module Mutations
|
|||
field :commit,
|
||||
Types::CommitType,
|
||||
null: true,
|
||||
description: 'The commit after mutation.'
|
||||
description: 'Commit after mutation.'
|
||||
|
||||
field :content,
|
||||
[GraphQL::Types::String],
|
||||
|
|
|
@ -8,13 +8,13 @@ module Mutations
|
|||
argument :assignee_usernames,
|
||||
[GraphQL::Types::String],
|
||||
required: true,
|
||||
description: 'The usernames to assign to the resource. Replaces existing assignees by default.'
|
||||
description: 'Usernames to assign to the resource. Replaces existing assignees by default.'
|
||||
|
||||
argument :operation_mode,
|
||||
Types::MutationOperationModeEnum,
|
||||
required: false,
|
||||
default_value: Types::MutationOperationModeEnum.default_mode,
|
||||
description: 'The operation to perform. Defaults to REPLACE.'
|
||||
description: 'Operation to perform. Defaults to REPLACE.'
|
||||
end
|
||||
|
||||
def resolve(project_path:, iid:, assignee_usernames:, operation_mode:)
|
||||
|
|
|
@ -16,12 +16,12 @@ module Mutations
|
|||
argument :captcha_response, GraphQL::Types::String,
|
||||
required: false,
|
||||
deprecated: DEPRECATION_NOTICE,
|
||||
description: 'A valid CAPTCHA response value obtained by using the provided captchaSiteKey with a CAPTCHA API to present a challenge to be solved on the client. Required to resubmit if the previous operation returned "NeedsCaptchaResponse: true".'
|
||||
description: 'Valid CAPTCHA response value obtained by using the provided captchaSiteKey with a CAPTCHA API to present a challenge to be solved on the client. Required to resubmit if the previous operation returned "NeedsCaptchaResponse: true".'
|
||||
|
||||
argument :spam_log_id, GraphQL::Types::Int,
|
||||
required: false,
|
||||
deprecated: DEPRECATION_NOTICE,
|
||||
description: 'The spam log ID which must be passed along with a valid CAPTCHA response for the operation to be completed. Required to resubmit if the previous operation returned "NeedsCaptchaResponse: true".'
|
||||
description: 'Spam log ID which must be passed along with a valid CAPTCHA response for the operation to be completed. Required to resubmit if the previous operation returned "NeedsCaptchaResponse: true".'
|
||||
|
||||
field :spam,
|
||||
GraphQL::Types::Boolean,
|
||||
|
@ -39,13 +39,13 @@ module Mutations
|
|||
GraphQL::Types::Int,
|
||||
null: true,
|
||||
deprecated: DEPRECATION_NOTICE,
|
||||
description: 'The spam log ID which must be passed along with a valid CAPTCHA response for an operation to be completed. Included only when an operation was not completed because "NeedsCaptchaResponse" is true.'
|
||||
description: 'Spam log ID which must be passed along with a valid CAPTCHA response for an operation to be completed. Included only when an operation was not completed because "NeedsCaptchaResponse" is true.'
|
||||
|
||||
field :captcha_site_key,
|
||||
GraphQL::Types::String,
|
||||
null: true,
|
||||
deprecated: DEPRECATION_NOTICE,
|
||||
description: 'The CAPTCHA site key which must be used to render a challenge for the user to solve to obtain a valid captchaResponse value. Included only when an operation was not completed because "NeedsCaptchaResponse" is true.'
|
||||
description: 'CAPTCHA site key which must be used to render a challenge for the user to solve to obtain a valid captchaResponse value. Included only when an operation was not completed because "NeedsCaptchaResponse" is true.'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module Mutations
|
|||
argument :subscribed_state,
|
||||
GraphQL::Types::Boolean,
|
||||
required: true,
|
||||
description: 'The desired state of the subscription.'
|
||||
description: 'Desired state of the subscription.'
|
||||
end
|
||||
|
||||
def resolve(project_path:, iid:, subscribed_state:)
|
||||
|
|
|
@ -12,7 +12,7 @@ module Mutations
|
|||
argument :project_path,
|
||||
GraphQL::Types::ID,
|
||||
required: true,
|
||||
description: 'The project path where the container expiration policy is located.'
|
||||
description: 'Project path where the container expiration policy is located.'
|
||||
|
||||
argument :enabled,
|
||||
GraphQL::Types::Boolean,
|
||||
|
@ -47,7 +47,7 @@ module Mutations
|
|||
field :container_expiration_policy,
|
||||
Types::ContainerExpirationPolicyType,
|
||||
null: true,
|
||||
description: 'The container expiration policy after mutation.'
|
||||
description: 'Container expiration policy after mutation.'
|
||||
|
||||
def resolve(project_path:, **args)
|
||||
project = authorized_find!(project_path)
|
||||
|
|
|
@ -15,7 +15,7 @@ module Mutations
|
|||
field :container_repository,
|
||||
Types::ContainerRepositoryType,
|
||||
null: false,
|
||||
description: 'The container repository policy after scheduling the deletion.'
|
||||
description: 'Container repository policy after scheduling the deletion.'
|
||||
|
||||
def resolve(id:)
|
||||
container_repository = authorized_find!(id: id)
|
||||
|
|
|
@ -12,7 +12,7 @@ module Mutations
|
|||
field :custom_emoji,
|
||||
Types::CustomEmojiType,
|
||||
null: true,
|
||||
description: 'The new custom emoji.'
|
||||
description: 'New custom emoji.'
|
||||
|
||||
argument :group_path, GraphQL::Types::ID,
|
||||
required: true,
|
||||
|
|
|
@ -7,11 +7,11 @@ module Mutations
|
|||
|
||||
argument :project_path, GraphQL::Types::ID,
|
||||
required: true,
|
||||
description: "The project where the issue is to upload designs for."
|
||||
description: "Project where the issue is to upload designs for."
|
||||
|
||||
argument :iid, GraphQL::Types::ID,
|
||||
required: true,
|
||||
description: "The IID of the issue to modify designs for."
|
||||
description: "IID of the issue to modify designs for."
|
||||
|
||||
private
|
||||
|
||||
|
|
|
@ -9,14 +9,14 @@ module Mutations
|
|||
|
||||
argument :filenames, [GraphQL::Types::String],
|
||||
required: true,
|
||||
description: "The filenames of the designs to delete.",
|
||||
description: "Filenames of the designs to delete.",
|
||||
prepare: ->(names, _ctx) do
|
||||
names.presence || (raise Errors::ArgumentError, 'no filenames')
|
||||
end
|
||||
|
||||
field :version, Types::DesignManagement::VersionType,
|
||||
null: true, # null on error
|
||||
description: 'The new version in which the designs are deleted.'
|
||||
description: 'New version in which the designs are deleted.'
|
||||
|
||||
authorize :destroy_design
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ module Mutations
|
|||
|
||||
field :design_collection, Types::DesignManagement::DesignCollectionType,
|
||||
null: true,
|
||||
description: "The current state of the collection."
|
||||
description: "Current state of the collection."
|
||||
|
||||
def resolve(**args)
|
||||
service = ::DesignManagement::MoveDesignsService.new(current_user, parameters(**args))
|
||||
|
|
|
@ -7,13 +7,13 @@ module Mutations
|
|||
|
||||
argument :files, [ApolloUploadServer::Upload],
|
||||
required: true,
|
||||
description: "The files to upload."
|
||||
description: "Files to upload."
|
||||
|
||||
authorize :create_design
|
||||
|
||||
field :designs, [Types::DesignManagement::DesignType],
|
||||
null: false,
|
||||
description: "The designs that were uploaded by the mutation."
|
||||
description: "Designs that were uploaded by the mutation."
|
||||
|
||||
field :skipped_designs, [Types::DesignManagement::DesignType],
|
||||
null: false,
|
||||
|
|
|
@ -10,7 +10,7 @@ module Mutations
|
|||
argument :id,
|
||||
Types::GlobalIDType[Discussion],
|
||||
required: true,
|
||||
description: 'The global ID of the discussion.'
|
||||
description: 'Global ID of the discussion.'
|
||||
|
||||
argument :resolve,
|
||||
GraphQL::Types::Boolean,
|
||||
|
@ -20,7 +20,7 @@ module Mutations
|
|||
field :discussion,
|
||||
Types::Notes::DiscussionType,
|
||||
null: true,
|
||||
description: 'The discussion after mutation.'
|
||||
description: 'Discussion after mutation.'
|
||||
|
||||
def resolve(id:, resolve:)
|
||||
discussion = authorized_find_discussion!(id: id)
|
||||
|
|
|
@ -11,12 +11,12 @@ module Mutations
|
|||
argument :id,
|
||||
::Types::GlobalIDType[::Environment],
|
||||
required: true,
|
||||
description: 'The global ID of the environment to update.'
|
||||
description: 'Global ID of the environment to update.'
|
||||
|
||||
argument :weight,
|
||||
GraphQL::Types::Int,
|
||||
required: true,
|
||||
description: 'The weight of the Canary Ingress.'
|
||||
description: 'Weight of the Canary Ingress.'
|
||||
|
||||
def resolve(id:, **kwargs)
|
||||
environment = authorized_find!(id: id)
|
||||
|
|
|
@ -11,7 +11,7 @@ module Mutations
|
|||
|
||||
field :group, Types::GroupType,
|
||||
null: true,
|
||||
description: 'The group after update.'
|
||||
description: 'Group after update.'
|
||||
|
||||
argument :full_path, GraphQL::Types::ID,
|
||||
required: true,
|
||||
|
|
|
@ -7,16 +7,16 @@ module Mutations
|
|||
|
||||
argument :project_path, GraphQL::Types::ID,
|
||||
required: true,
|
||||
description: "The project the issue to mutate is in."
|
||||
description: "Project the issue to mutate is in."
|
||||
|
||||
argument :iid, GraphQL::Types::String,
|
||||
required: true,
|
||||
description: "The IID of the issue to mutate."
|
||||
description: "IID of the issue to mutate."
|
||||
|
||||
field :issue,
|
||||
Types::IssueType,
|
||||
null: true,
|
||||
description: "The issue after mutation."
|
||||
description: "Issue after mutation."
|
||||
|
||||
authorize :update_issue
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ module Mutations
|
|||
|
||||
argument :iid, GraphQL::Types::Int,
|
||||
required: false,
|
||||
description: 'The IID (internal ID) of a project issue. Only admins and project owners can modify.'
|
||||
description: 'IID (internal ID) of a project issue. Only admins and project owners can modify.'
|
||||
|
||||
argument :title, GraphQL::Types::String,
|
||||
required: true,
|
||||
|
@ -24,7 +24,7 @@ module Mutations
|
|||
|
||||
argument :milestone_id, ::Types::GlobalIDType[::Milestone],
|
||||
required: false,
|
||||
description: 'The ID of the milestone to assign to the issue. On update milestone will be removed if set to null.'
|
||||
description: 'ID of the milestone to assign to the issue. On update milestone will be removed if set to null.'
|
||||
|
||||
argument :labels, [GraphQL::Types::String],
|
||||
required: false,
|
||||
|
@ -32,7 +32,7 @@ module Mutations
|
|||
|
||||
argument :label_ids, [::Types::GlobalIDType[::Label]],
|
||||
required: false,
|
||||
description: 'The IDs of labels to be added to the issue.'
|
||||
description: 'IDs of labels to be added to the issue.'
|
||||
|
||||
argument :created_at, Types::TimeType,
|
||||
required: false,
|
||||
|
@ -40,20 +40,20 @@ module Mutations
|
|||
|
||||
argument :merge_request_to_resolve_discussions_of, ::Types::GlobalIDType[::MergeRequest],
|
||||
required: false,
|
||||
description: 'The IID of a merge request for which to resolve discussions.'
|
||||
description: 'IID of a merge request for which to resolve discussions.'
|
||||
|
||||
argument :discussion_to_resolve, GraphQL::Types::String,
|
||||
required: false,
|
||||
description: 'The ID of a discussion to resolve. Also pass `merge_request_to_resolve_discussions_of`.'
|
||||
description: 'ID of a discussion to resolve. Also pass `merge_request_to_resolve_discussions_of`.'
|
||||
|
||||
argument :assignee_ids, [::Types::GlobalIDType[::User]],
|
||||
required: false,
|
||||
description: 'The array of user IDs to assign to the issue.'
|
||||
description: 'Array of user IDs to assign to the issue.'
|
||||
|
||||
field :issue,
|
||||
Types::IssueType,
|
||||
null: true,
|
||||
description: 'The issue after mutation.'
|
||||
description: 'Issue after mutation.'
|
||||
|
||||
def ready?(**args)
|
||||
if args.slice(*mutually_exclusive_label_args).size > 1
|
||||
|
|
|
@ -8,7 +8,7 @@ module Mutations
|
|||
argument :target_project_path,
|
||||
GraphQL::Types::ID,
|
||||
required: true,
|
||||
description: 'The project to move the issue to.'
|
||||
description: 'Project to move the issue to.'
|
||||
|
||||
def resolve(project_path:, iid:, target_project_path:)
|
||||
Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/20816')
|
||||
|
|
|
@ -8,7 +8,7 @@ module Mutations
|
|||
argument :due_date,
|
||||
Types::TimeType,
|
||||
required: :nullable,
|
||||
description: 'The desired due date for the issue. Due date is removed if null.'
|
||||
description: 'Desired due date for the issue. Due date is removed if null.'
|
||||
|
||||
def resolve(project_path:, iid:, due_date:)
|
||||
issue = authorized_find!(project_path: project_path, iid: iid)
|
||||
|
|
|
@ -10,16 +10,16 @@ module Mutations
|
|||
|
||||
argument :project_path, GraphQL::Types::ID,
|
||||
required: true,
|
||||
description: "The project the issue to mutate is in."
|
||||
description: "Project the issue to mutate is in."
|
||||
|
||||
argument :iid, GraphQL::Types::String,
|
||||
required: true,
|
||||
description: "The IID of the issue to mutate."
|
||||
description: "IID of the issue to mutate."
|
||||
|
||||
field :issue,
|
||||
Types::IssueType,
|
||||
null: true,
|
||||
description: "The issue after mutation."
|
||||
description: "Issue after mutation."
|
||||
|
||||
authorize :update_subscription
|
||||
|
||||
|
|
|
@ -13,19 +13,19 @@ module Mutations
|
|||
|
||||
argument :milestone_id, GraphQL::Types::ID, # rubocop: disable Graphql/IDType
|
||||
required: false,
|
||||
description: 'The ID of the milestone to assign to the issue. On update milestone will be removed if set to null.'
|
||||
description: 'ID of the milestone to assign to the issue. On update milestone will be removed if set to null.'
|
||||
|
||||
argument :add_label_ids, [GraphQL::Types::ID],
|
||||
required: false,
|
||||
description: 'The IDs of labels to be added to the issue.'
|
||||
description: 'IDs of labels to be added to the issue.'
|
||||
|
||||
argument :remove_label_ids, [GraphQL::Types::ID],
|
||||
required: false,
|
||||
description: 'The IDs of labels to be removed from the issue.'
|
||||
description: 'IDs of labels to be removed from the issue.'
|
||||
|
||||
argument :label_ids, [GraphQL::Types::ID],
|
||||
required: false,
|
||||
description: 'The IDs of labels to be set. Replaces existing issue labels.'
|
||||
description: 'IDs of labels to be set. Replaces existing issue labels.'
|
||||
|
||||
argument :state_event, Types::IssueStateEventEnum,
|
||||
description: 'Close or reopen an issue.',
|
||||
|
|
|
@ -16,10 +16,10 @@ module Mutations
|
|||
|
||||
argument :project_path, GraphQL::Types::ID,
|
||||
required: true,
|
||||
description: 'The project to import the Jira users into.'
|
||||
description: 'Project to import the Jira users into.'
|
||||
argument :start_at, GraphQL::Types::Int,
|
||||
required: false,
|
||||
description: 'The index of the record the import should started at, default 0 (50 records returned).'
|
||||
description: 'Index of the record the import should started at, default 0 (50 records returned).'
|
||||
|
||||
def resolve(project_path:, start_at: 0)
|
||||
project = authorized_find!(project_path)
|
||||
|
|
|
@ -12,11 +12,11 @@ module Mutations
|
|||
field :jira_import,
|
||||
Types::JiraImportType,
|
||||
null: true,
|
||||
description: 'The Jira import data after mutation.'
|
||||
description: 'Jira import data after mutation.'
|
||||
|
||||
argument :project_path, GraphQL::Types::ID,
|
||||
required: true,
|
||||
description: 'The project to import the Jira project into.'
|
||||
description: 'Project to import the Jira project into.'
|
||||
argument :jira_project_key, GraphQL::Types::String,
|
||||
required: true,
|
||||
description: 'Project key of the importer Jira project.'
|
||||
|
@ -26,7 +26,7 @@ module Mutations
|
|||
argument :users_mapping,
|
||||
[Types::JiraUsersMappingInputType],
|
||||
required: false,
|
||||
description: 'The mapping of Jira to GitLab users.'
|
||||
description: 'Mapping of Jira to GitLab users.'
|
||||
|
||||
def resolve(project_path:, jira_project_key:, users_mapping:)
|
||||
project = authorized_find!(project_path)
|
||||
|
|
|
@ -10,7 +10,7 @@ module Mutations
|
|||
field :label,
|
||||
Types::LabelType,
|
||||
null: true,
|
||||
description: 'The label after mutation.'
|
||||
description: 'Label after mutation.'
|
||||
|
||||
argument :title, GraphQL::Types::String,
|
||||
required: true,
|
||||
|
|
|
@ -31,7 +31,7 @@ module Mutations
|
|||
description: 'Custom squash commit message (if squash is true).'
|
||||
argument :sha, ::GraphQL::Types::String,
|
||||
required: true,
|
||||
description: 'The HEAD SHA at the time when this merge was requested.'
|
||||
description: 'HEAD SHA at the time when this merge was requested.'
|
||||
|
||||
argument :should_remove_source_branch, ::GraphQL::Types::Boolean,
|
||||
required: false,
|
||||
|
|
|
@ -7,16 +7,16 @@ module Mutations
|
|||
|
||||
argument :project_path, GraphQL::Types::ID,
|
||||
required: true,
|
||||
description: "The project the merge request to mutate is in."
|
||||
description: "Project the merge request to mutate is in."
|
||||
|
||||
argument :iid, GraphQL::Types::String,
|
||||
required: true,
|
||||
description: "The IID of the merge request to mutate."
|
||||
description: "IID of the merge request to mutate."
|
||||
|
||||
field :merge_request,
|
||||
Types::MergeRequestType,
|
||||
null: true,
|
||||
description: "The merge request after mutation."
|
||||
description: "Merge request after mutation."
|
||||
|
||||
authorize :update_merge_request
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ module Mutations
|
|||
field :merge_request,
|
||||
Types::MergeRequestType,
|
||||
null: true,
|
||||
description: 'The merge request after mutation.'
|
||||
description: 'Merge request after mutation.'
|
||||
|
||||
authorize :create_merge_request_from
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ module Mutations
|
|||
loads: Types::UserType,
|
||||
required: true,
|
||||
description: <<~DESC
|
||||
The user ID for the user that has been requested for a new review.
|
||||
User ID for the user that has been requested for a new review.
|
||||
DESC
|
||||
|
||||
def resolve(project_path:, iid:, user:)
|
||||
|
|
|
@ -9,7 +9,7 @@ module Mutations
|
|||
[::Types::GlobalIDType[Label]],
|
||||
required: true,
|
||||
description: <<~DESC
|
||||
The Label IDs to set. Replaces existing labels by default.
|
||||
Label IDs to set. Replaces existing labels by default.
|
||||
DESC
|
||||
|
||||
argument :operation_mode,
|
||||
|
|
|
@ -10,7 +10,7 @@ module Mutations
|
|||
required: false,
|
||||
loads: Types::MilestoneType,
|
||||
description: <<~DESC
|
||||
The milestone to assign to the merge request.
|
||||
Milestone to assign to the merge request.
|
||||
DESC
|
||||
|
||||
def resolve(project_path:, iid:, milestone: nil)
|
||||
|
|
|
@ -10,16 +10,16 @@ module Mutations
|
|||
|
||||
argument :project_path, GraphQL::Types::ID,
|
||||
required: true,
|
||||
description: "The project the merge request to mutate is in."
|
||||
description: "Project the merge request to mutate is in."
|
||||
|
||||
argument :iid, GraphQL::Types::String,
|
||||
required: true,
|
||||
description: "The IID of the merge request to mutate."
|
||||
description: "IID of the merge request to mutate."
|
||||
|
||||
field :merge_request,
|
||||
Types::MergeRequestType,
|
||||
null: true,
|
||||
description: "The merge request after mutation."
|
||||
description: "Merge request after mutation."
|
||||
|
||||
authorize :update_subscription
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ module Mutations
|
|||
argument :state, ::Types::MergeRequestStateEventEnum,
|
||||
required: false,
|
||||
as: :state_event,
|
||||
description: 'The action to perform to change the state.'
|
||||
description: 'Action to perform to change the state.'
|
||||
|
||||
def resolve(project_path:, iid:, **args)
|
||||
merge_request = authorized_find!(project_path: project_path, iid: iid)
|
||||
|
|
|
@ -15,17 +15,17 @@ module Mutations
|
|||
field :annotation,
|
||||
Types::Metrics::Dashboards::AnnotationType,
|
||||
null: true,
|
||||
description: 'The created annotation.'
|
||||
description: 'Created annotation.'
|
||||
|
||||
argument :environment_id,
|
||||
::Types::GlobalIDType[::Environment],
|
||||
required: false,
|
||||
description: 'The global ID of the environment to add an annotation to.'
|
||||
description: 'Global ID of the environment to add an annotation to.'
|
||||
|
||||
argument :cluster_id,
|
||||
::Types::GlobalIDType[::Clusters::Cluster],
|
||||
required: false,
|
||||
description: 'The global ID of the cluster to add an annotation to.'
|
||||
description: 'Global ID of the cluster to add an annotation to.'
|
||||
|
||||
argument :starting_at, Types::TimeType,
|
||||
required: true,
|
||||
|
@ -38,12 +38,12 @@ module Mutations
|
|||
argument :dashboard_path,
|
||||
GraphQL::Types::String,
|
||||
required: true,
|
||||
description: 'The path to a file defining the dashboard on which the annotation should be added.'
|
||||
description: 'Path to a file defining the dashboard on which the annotation should be added.'
|
||||
|
||||
argument :description,
|
||||
GraphQL::Types::String,
|
||||
required: true,
|
||||
description: 'The description of the annotation.'
|
||||
description: 'Description of the annotation.'
|
||||
|
||||
AnnotationSource = Struct.new(:object, keyword_init: true) do
|
||||
def type_keys
|
||||
|
|
|
@ -13,7 +13,7 @@ module Mutations
|
|||
argument :namespace_path,
|
||||
GraphQL::Types::ID,
|
||||
required: true,
|
||||
description: 'The namespace path where the namespace package setting is located.'
|
||||
description: 'Namespace path where the namespace package setting is located.'
|
||||
|
||||
argument :maven_duplicates_allowed,
|
||||
GraphQL::Types::Boolean,
|
||||
|
@ -38,7 +38,7 @@ module Mutations
|
|||
field :package_settings,
|
||||
Types::Namespace::PackageSettingsType,
|
||||
null: true,
|
||||
description: 'The namespace package setting after mutation.'
|
||||
description: 'Namespace package setting after mutation.'
|
||||
|
||||
def resolve(namespace_path:, **args)
|
||||
namespace = authorized_find!(namespace_path: namespace_path)
|
||||
|
|
8
config/feature_flags/development/ci_include_rules.yml
Normal file
8
config/feature_flags/development/ci_include_rules.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
name: ci_include_rules
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67409
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/337507
|
||||
milestone: '14.2'
|
||||
type: development
|
||||
group: group::pipeline authoring
|
||||
default_enabled: false
|
|
@ -936,7 +936,7 @@ Input type: `CommitCreateInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationcommitcreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationcommitcreatecommit"></a>`commit` | [`Commit`](#commit) | The commit after mutation. |
|
||||
| <a id="mutationcommitcreatecommit"></a>`commit` | [`Commit`](#commit) | Commit after mutation. |
|
||||
| <a id="mutationcommitcreatecommitpipelinepath"></a>`commitPipelinePath` | [`String`](#string) | ETag path for the commit's pipeline. |
|
||||
| <a id="mutationcommitcreatecontent"></a>`content` | [`[String!]`](#string) | Contents of the commit. |
|
||||
| <a id="mutationcommitcreateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
|
@ -1046,18 +1046,18 @@ Input type: `CreateAnnotationInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationcreateannotationclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationcreateannotationclusterid"></a>`clusterId` | [`ClustersClusterID`](#clustersclusterid) | The global ID of the cluster to add an annotation to. |
|
||||
| <a id="mutationcreateannotationdashboardpath"></a>`dashboardPath` | [`String!`](#string) | The path to a file defining the dashboard on which the annotation should be added. |
|
||||
| <a id="mutationcreateannotationdescription"></a>`description` | [`String!`](#string) | The description of the annotation. |
|
||||
| <a id="mutationcreateannotationclusterid"></a>`clusterId` | [`ClustersClusterID`](#clustersclusterid) | Global ID of the cluster to add an annotation to. |
|
||||
| <a id="mutationcreateannotationdashboardpath"></a>`dashboardPath` | [`String!`](#string) | Path to a file defining the dashboard on which the annotation should be added. |
|
||||
| <a id="mutationcreateannotationdescription"></a>`description` | [`String!`](#string) | Description of the annotation. |
|
||||
| <a id="mutationcreateannotationendingat"></a>`endingAt` | [`Time`](#time) | Timestamp indicating ending moment to which the annotation relates. |
|
||||
| <a id="mutationcreateannotationenvironmentid"></a>`environmentId` | [`EnvironmentID`](#environmentid) | The global ID of the environment to add an annotation to. |
|
||||
| <a id="mutationcreateannotationenvironmentid"></a>`environmentId` | [`EnvironmentID`](#environmentid) | Global ID of the environment to add an annotation to. |
|
||||
| <a id="mutationcreateannotationstartingat"></a>`startingAt` | [`Time!`](#time) | Timestamp indicating starting moment to which the annotation relates. |
|
||||
|
||||
#### Fields
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationcreateannotationannotation"></a>`annotation` | [`MetricsDashboardAnnotation`](#metricsdashboardannotation) | The created annotation. |
|
||||
| <a id="mutationcreateannotationannotation"></a>`annotation` | [`MetricsDashboardAnnotation`](#metricsdashboardannotation) | Created annotation. |
|
||||
| <a id="mutationcreateannotationclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationcreateannotationerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
|
||||
|
@ -1171,7 +1171,7 @@ Input type: `CreateCustomEmojiInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationcreatecustomemojiclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationcreatecustomemojicustomemoji"></a>`customEmoji` | [`CustomEmoji`](#customemoji) | The new custom emoji. |
|
||||
| <a id="mutationcreatecustomemojicustomemoji"></a>`customEmoji` | [`CustomEmoji`](#customemoji) | New custom emoji. |
|
||||
| <a id="mutationcreatecustomemojierrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
|
||||
### `Mutation.createDiffNote`
|
||||
|
@ -1254,21 +1254,21 @@ Input type: `CreateIssueInput`
|
|||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationcreateissueassigneeids"></a>`assigneeIds` | [`[UserID!]`](#userid) | The array of user IDs to assign to the issue. |
|
||||
| <a id="mutationcreateissueassigneeids"></a>`assigneeIds` | [`[UserID!]`](#userid) | Array of user IDs to assign to the issue. |
|
||||
| <a id="mutationcreateissueclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationcreateissueconfidential"></a>`confidential` | [`Boolean`](#boolean) | Indicates the issue is confidential. |
|
||||
| <a id="mutationcreateissuecreatedat"></a>`createdAt` | [`Time`](#time) | Timestamp when the issue was created. Available only for admins and project owners. |
|
||||
| <a id="mutationcreateissuedescription"></a>`description` | [`String`](#string) | Description of the issue. |
|
||||
| <a id="mutationcreateissuediscussiontoresolve"></a>`discussionToResolve` | [`String`](#string) | The ID of a discussion to resolve. Also pass `merge_request_to_resolve_discussions_of`. |
|
||||
| <a id="mutationcreateissuediscussiontoresolve"></a>`discussionToResolve` | [`String`](#string) | ID of a discussion to resolve. Also pass `merge_request_to_resolve_discussions_of`. |
|
||||
| <a id="mutationcreateissueduedate"></a>`dueDate` | [`ISO8601Date`](#iso8601date) | Due date of the issue. |
|
||||
| <a id="mutationcreateissueepicid"></a>`epicId` | [`EpicID`](#epicid) | The ID of an epic to associate the issue with. |
|
||||
| <a id="mutationcreateissuehealthstatus"></a>`healthStatus` | [`HealthStatus`](#healthstatus) | The desired health status. |
|
||||
| <a id="mutationcreateissueiid"></a>`iid` | [`Int`](#int) | The IID (internal ID) of a project issue. Only admins and project owners can modify. |
|
||||
| <a id="mutationcreateissuelabelids"></a>`labelIds` | [`[LabelID!]`](#labelid) | The IDs of labels to be added to the issue. |
|
||||
| <a id="mutationcreateissueiid"></a>`iid` | [`Int`](#int) | IID (internal ID) of a project issue. Only admins and project owners can modify. |
|
||||
| <a id="mutationcreateissuelabelids"></a>`labelIds` | [`[LabelID!]`](#labelid) | IDs of labels to be added to the issue. |
|
||||
| <a id="mutationcreateissuelabels"></a>`labels` | [`[String!]`](#string) | Labels of the issue. |
|
||||
| <a id="mutationcreateissuelocked"></a>`locked` | [`Boolean`](#boolean) | Indicates discussion is locked on the issue. |
|
||||
| <a id="mutationcreateissuemergerequesttoresolvediscussionsof"></a>`mergeRequestToResolveDiscussionsOf` | [`MergeRequestID`](#mergerequestid) | The IID of a merge request for which to resolve discussions. |
|
||||
| <a id="mutationcreateissuemilestoneid"></a>`milestoneId` | [`MilestoneID`](#milestoneid) | The ID of the milestone to assign to the issue. On update milestone will be removed if set to null. |
|
||||
| <a id="mutationcreateissuemergerequesttoresolvediscussionsof"></a>`mergeRequestToResolveDiscussionsOf` | [`MergeRequestID`](#mergerequestid) | IID of a merge request for which to resolve discussions. |
|
||||
| <a id="mutationcreateissuemilestoneid"></a>`milestoneId` | [`MilestoneID`](#milestoneid) | ID of the milestone to assign to the issue. On update milestone will be removed if set to null. |
|
||||
| <a id="mutationcreateissueprojectpath"></a>`projectPath` | [`ID!`](#id) | Project full path the issue is associated with. |
|
||||
| <a id="mutationcreateissuetitle"></a>`title` | [`String!`](#string) | Title of the issue. |
|
||||
| <a id="mutationcreateissuetype"></a>`type` | [`IssueType`](#issuetype) | Type of the issue. |
|
||||
|
@ -1280,7 +1280,7 @@ Input type: `CreateIssueInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationcreateissueclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationcreateissueerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationcreateissueissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationcreateissueissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.createIteration`
|
||||
|
||||
|
@ -1749,9 +1749,9 @@ Input type: `DesignManagementDeleteInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationdesignmanagementdeleteclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationdesignmanagementdeletefilenames"></a>`filenames` | [`[String!]!`](#string) | The filenames of the designs to delete. |
|
||||
| <a id="mutationdesignmanagementdeleteiid"></a>`iid` | [`ID!`](#id) | The IID of the issue to modify designs for. |
|
||||
| <a id="mutationdesignmanagementdeleteprojectpath"></a>`projectPath` | [`ID!`](#id) | The project where the issue is to upload designs for. |
|
||||
| <a id="mutationdesignmanagementdeletefilenames"></a>`filenames` | [`[String!]!`](#string) | Filenames of the designs to delete. |
|
||||
| <a id="mutationdesignmanagementdeleteiid"></a>`iid` | [`ID!`](#id) | IID of the issue to modify designs for. |
|
||||
| <a id="mutationdesignmanagementdeleteprojectpath"></a>`projectPath` | [`ID!`](#id) | Project where the issue is to upload designs for. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -1759,7 +1759,7 @@ Input type: `DesignManagementDeleteInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationdesignmanagementdeleteclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationdesignmanagementdeleteerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationdesignmanagementdeleteversion"></a>`version` | [`DesignVersion`](#designversion) | The new version in which the designs are deleted. |
|
||||
| <a id="mutationdesignmanagementdeleteversion"></a>`version` | [`DesignVersion`](#designversion) | New version in which the designs are deleted. |
|
||||
|
||||
### `Mutation.designManagementMove`
|
||||
|
||||
|
@ -1779,7 +1779,7 @@ Input type: `DesignManagementMoveInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationdesignmanagementmoveclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationdesignmanagementmovedesigncollection"></a>`designCollection` | [`DesignCollection`](#designcollection) | The current state of the collection. |
|
||||
| <a id="mutationdesignmanagementmovedesigncollection"></a>`designCollection` | [`DesignCollection`](#designcollection) | Current state of the collection. |
|
||||
| <a id="mutationdesignmanagementmoveerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
|
||||
### `Mutation.designManagementUpload`
|
||||
|
@ -1791,16 +1791,16 @@ Input type: `DesignManagementUploadInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationdesignmanagementuploadclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationdesignmanagementuploadfiles"></a>`files` | [`[Upload!]!`](#upload) | The files to upload. |
|
||||
| <a id="mutationdesignmanagementuploadiid"></a>`iid` | [`ID!`](#id) | The IID of the issue to modify designs for. |
|
||||
| <a id="mutationdesignmanagementuploadprojectpath"></a>`projectPath` | [`ID!`](#id) | The project where the issue is to upload designs for. |
|
||||
| <a id="mutationdesignmanagementuploadfiles"></a>`files` | [`[Upload!]!`](#upload) | Files to upload. |
|
||||
| <a id="mutationdesignmanagementuploadiid"></a>`iid` | [`ID!`](#id) | IID of the issue to modify designs for. |
|
||||
| <a id="mutationdesignmanagementuploadprojectpath"></a>`projectPath` | [`ID!`](#id) | Project where the issue is to upload designs for. |
|
||||
|
||||
#### Fields
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationdesignmanagementuploadclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationdesignmanagementuploaddesigns"></a>`designs` | [`[Design!]!`](#design) | The designs that were uploaded by the mutation. |
|
||||
| <a id="mutationdesignmanagementuploaddesigns"></a>`designs` | [`[Design!]!`](#design) | Designs that were uploaded by the mutation. |
|
||||
| <a id="mutationdesignmanagementuploaderrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationdesignmanagementuploadskippeddesigns"></a>`skippedDesigns` | [`[Design!]!`](#design) | Any designs that were skipped from the upload due to there being no change to their content since their last version. |
|
||||
|
||||
|
@ -1876,7 +1876,7 @@ Input type: `DestroyContainerRepositoryInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationdestroycontainerrepositoryclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationdestroycontainerrepositorycontainerrepository"></a>`containerRepository` | [`ContainerRepository!`](#containerrepository) | The container repository policy after scheduling the deletion. |
|
||||
| <a id="mutationdestroycontainerrepositorycontainerrepository"></a>`containerRepository` | [`ContainerRepository!`](#containerrepository) | Container repository policy after scheduling the deletion. |
|
||||
| <a id="mutationdestroycontainerrepositoryerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
|
||||
### `Mutation.destroyContainerRepositoryTags`
|
||||
|
@ -2023,7 +2023,7 @@ Input type: `DiscussionToggleResolveInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationdiscussiontoggleresolveclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationdiscussiontoggleresolveid"></a>`id` | [`DiscussionID!`](#discussionid) | The global ID of the discussion. |
|
||||
| <a id="mutationdiscussiontoggleresolveid"></a>`id` | [`DiscussionID!`](#discussionid) | Global ID of the discussion. |
|
||||
| <a id="mutationdiscussiontoggleresolveresolve"></a>`resolve` | [`Boolean!`](#boolean) | Will resolve the discussion when true, and unresolve the discussion when false. |
|
||||
|
||||
#### Fields
|
||||
|
@ -2031,7 +2031,7 @@ Input type: `DiscussionToggleResolveInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationdiscussiontoggleresolveclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationdiscussiontoggleresolvediscussion"></a>`discussion` | [`Discussion`](#discussion) | The discussion after mutation. |
|
||||
| <a id="mutationdiscussiontoggleresolvediscussion"></a>`discussion` | [`Discussion`](#discussion) | Discussion after mutation. |
|
||||
| <a id="mutationdiscussiontoggleresolveerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
|
||||
### `Mutation.echoCreate`
|
||||
|
@ -2090,8 +2090,8 @@ Input type: `EnvironmentsCanaryIngressUpdateInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationenvironmentscanaryingressupdateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationenvironmentscanaryingressupdateid"></a>`id` | [`EnvironmentID!`](#environmentid) | The global ID of the environment to update. |
|
||||
| <a id="mutationenvironmentscanaryingressupdateweight"></a>`weight` | [`Int!`](#int) | The weight of the Canary Ingress. |
|
||||
| <a id="mutationenvironmentscanaryingressupdateid"></a>`id` | [`EnvironmentID!`](#environmentid) | Global ID of the environment to update. |
|
||||
| <a id="mutationenvironmentscanaryingressupdateweight"></a>`weight` | [`Int!`](#int) | Weight of the Canary Ingress. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -2400,7 +2400,7 @@ Input type: `GroupUpdateInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationgroupupdateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationgroupupdateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationgroupupdategroup"></a>`group` | [`Group`](#group) | The group after update. |
|
||||
| <a id="mutationgroupupdategroup"></a>`group` | [`Group`](#group) | Group after update. |
|
||||
|
||||
### `Mutation.httpIntegrationCreate`
|
||||
|
||||
|
@ -2495,9 +2495,9 @@ Input type: `IssueMoveInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuemoveclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuemoveiid"></a>`iid` | [`String!`](#string) | The IID of the issue to mutate. |
|
||||
| <a id="mutationissuemoveprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the issue to mutate is in. |
|
||||
| <a id="mutationissuemovetargetprojectpath"></a>`targetProjectPath` | [`ID!`](#id) | The project to move the issue to. |
|
||||
| <a id="mutationissuemoveiid"></a>`iid` | [`String!`](#string) | IID of the issue to mutate. |
|
||||
| <a id="mutationissuemoveprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the issue to mutate is in. |
|
||||
| <a id="mutationissuemovetargetprojectpath"></a>`targetProjectPath` | [`ID!`](#id) | Project to move the issue to. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -2505,7 +2505,7 @@ Input type: `IssueMoveInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuemoveclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuemoveerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationissuemoveissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationissuemoveissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.issueMoveList`
|
||||
|
||||
|
@ -2517,7 +2517,7 @@ Input type: `IssueMoveListInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuemovelistboardid"></a>`boardId` | [`BoardID!`](#boardid) | Global ID of the board that the issue is in. |
|
||||
| <a id="mutationissuemovelistclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuemovelistepicid"></a>`epicId` | [`EpicID`](#epicid) | The ID of the parent epic. NULL when removing the association. |
|
||||
| <a id="mutationissuemovelistepicid"></a>`epicId` | [`EpicID`](#epicid) | ID of the parent epic. NULL when removing the association. |
|
||||
| <a id="mutationissuemovelistfromlistid"></a>`fromListId` | [`ID`](#id) | ID of the board list that the issue will be moved from. |
|
||||
| <a id="mutationissuemovelistiid"></a>`iid` | [`String!`](#string) | IID of the issue to mutate. |
|
||||
| <a id="mutationissuemovelistmoveafterid"></a>`moveAfterId` | [`ID`](#id) | ID of issue that should be placed after the current issue. |
|
||||
|
@ -2531,7 +2531,7 @@ Input type: `IssueMoveListInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuemovelistclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuemovelisterrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationissuemovelistissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationissuemovelistissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.issueSetAssignees`
|
||||
|
||||
|
@ -2541,11 +2541,11 @@ Input type: `IssueSetAssigneesInput`
|
|||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetassigneesassigneeusernames"></a>`assigneeUsernames` | [`[String!]!`](#string) | The usernames to assign to the resource. Replaces existing assignees by default. |
|
||||
| <a id="mutationissuesetassigneesassigneeusernames"></a>`assigneeUsernames` | [`[String!]!`](#string) | Usernames to assign to the resource. Replaces existing assignees by default. |
|
||||
| <a id="mutationissuesetassigneesclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetassigneesiid"></a>`iid` | [`String!`](#string) | The IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetassigneesoperationmode"></a>`operationMode` | [`MutationOperationMode`](#mutationoperationmode) | The operation to perform. Defaults to REPLACE. |
|
||||
| <a id="mutationissuesetassigneesprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the issue to mutate is in. |
|
||||
| <a id="mutationissuesetassigneesiid"></a>`iid` | [`String!`](#string) | IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetassigneesoperationmode"></a>`operationMode` | [`MutationOperationMode`](#mutationoperationmode) | Operation to perform. Defaults to REPLACE. |
|
||||
| <a id="mutationissuesetassigneesprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the issue to mutate is in. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -2553,7 +2553,7 @@ Input type: `IssueSetAssigneesInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetassigneesclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetassigneeserrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationissuesetassigneesissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationissuesetassigneesissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.issueSetConfidential`
|
||||
|
||||
|
@ -2565,8 +2565,8 @@ Input type: `IssueSetConfidentialInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetconfidentialclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetconfidentialconfidential"></a>`confidential` | [`Boolean!`](#boolean) | Whether or not to set the issue as a confidential. |
|
||||
| <a id="mutationissuesetconfidentialiid"></a>`iid` | [`String!`](#string) | The IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetconfidentialprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the issue to mutate is in. |
|
||||
| <a id="mutationissuesetconfidentialiid"></a>`iid` | [`String!`](#string) | IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetconfidentialprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the issue to mutate is in. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -2574,7 +2574,7 @@ Input type: `IssueSetConfidentialInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetconfidentialclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetconfidentialerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationissuesetconfidentialissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationissuesetconfidentialissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.issueSetDueDate`
|
||||
|
||||
|
@ -2585,9 +2585,9 @@ Input type: `IssueSetDueDateInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetduedateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetduedateduedate"></a>`dueDate` | [`Time`](#time) | The desired due date for the issue. Due date is removed if null. |
|
||||
| <a id="mutationissuesetduedateiid"></a>`iid` | [`String!`](#string) | The IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetduedateprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the issue to mutate is in. |
|
||||
| <a id="mutationissuesetduedateduedate"></a>`dueDate` | [`Time`](#time) | Desired due date for the issue. Due date is removed if null. |
|
||||
| <a id="mutationissuesetduedateiid"></a>`iid` | [`String!`](#string) | IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetduedateprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the issue to mutate is in. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -2595,7 +2595,7 @@ Input type: `IssueSetDueDateInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetduedateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetduedateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationissuesetduedateissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationissuesetduedateissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.issueSetEpic`
|
||||
|
||||
|
@ -2607,8 +2607,8 @@ Input type: `IssueSetEpicInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetepicclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetepicepicid"></a>`epicId` | [`EpicID`](#epicid) | Global ID of the epic to be assigned to the issue, epic will be removed if absent or set to null. |
|
||||
| <a id="mutationissuesetepiciid"></a>`iid` | [`String!`](#string) | The IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetepicprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the issue to mutate is in. |
|
||||
| <a id="mutationissuesetepiciid"></a>`iid` | [`String!`](#string) | IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetepicprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the issue to mutate is in. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -2616,7 +2616,7 @@ Input type: `IssueSetEpicInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetepicclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetepicerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationissuesetepicissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationissuesetepicissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.issueSetIteration`
|
||||
|
||||
|
@ -2627,9 +2627,9 @@ Input type: `IssueSetIterationInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetiterationclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetiterationiid"></a>`iid` | [`String!`](#string) | The IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetiterationiid"></a>`iid` | [`String!`](#string) | IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetiterationiterationid"></a>`iterationId` | [`IterationID`](#iterationid) | The iteration to assign to the issue. |
|
||||
| <a id="mutationissuesetiterationprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the issue to mutate is in. |
|
||||
| <a id="mutationissuesetiterationprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the issue to mutate is in. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -2637,7 +2637,7 @@ Input type: `IssueSetIterationInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetiterationclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetiterationerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationissuesetiterationissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationissuesetiterationissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.issueSetLocked`
|
||||
|
||||
|
@ -2648,9 +2648,9 @@ Input type: `IssueSetLockedInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetlockedclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetlockediid"></a>`iid` | [`String!`](#string) | The IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetlockediid"></a>`iid` | [`String!`](#string) | IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetlockedlocked"></a>`locked` | [`Boolean!`](#boolean) | Whether or not to lock discussion on the issue. |
|
||||
| <a id="mutationissuesetlockedprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the issue to mutate is in. |
|
||||
| <a id="mutationissuesetlockedprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the issue to mutate is in. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -2658,7 +2658,7 @@ Input type: `IssueSetLockedInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetlockedclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetlockederrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationissuesetlockedissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationissuesetlockedissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.issueSetSeverity`
|
||||
|
||||
|
@ -2669,8 +2669,8 @@ Input type: `IssueSetSeverityInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetseverityclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetseverityiid"></a>`iid` | [`String!`](#string) | The IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetseverityprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the issue to mutate is in. |
|
||||
| <a id="mutationissuesetseverityiid"></a>`iid` | [`String!`](#string) | IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetseverityprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the issue to mutate is in. |
|
||||
| <a id="mutationissuesetseverityseverity"></a>`severity` | [`IssuableSeverity!`](#issuableseverity) | Set the incident severity level. |
|
||||
|
||||
#### Fields
|
||||
|
@ -2679,7 +2679,7 @@ Input type: `IssueSetSeverityInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetseverityclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetseverityerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationissuesetseverityissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationissuesetseverityissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.issueSetSubscription`
|
||||
|
||||
|
@ -2690,9 +2690,9 @@ Input type: `IssueSetSubscriptionInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetsubscriptionclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetsubscriptioniid"></a>`iid` | [`String!`](#string) | The IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetsubscriptionprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the issue to mutate is in. |
|
||||
| <a id="mutationissuesetsubscriptionsubscribedstate"></a>`subscribedState` | [`Boolean!`](#boolean) | The desired state of the subscription. |
|
||||
| <a id="mutationissuesetsubscriptioniid"></a>`iid` | [`String!`](#string) | IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetsubscriptionprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the issue to mutate is in. |
|
||||
| <a id="mutationissuesetsubscriptionsubscribedstate"></a>`subscribedState` | [`Boolean!`](#boolean) | Desired state of the subscription. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -2700,7 +2700,7 @@ Input type: `IssueSetSubscriptionInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetsubscriptionclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetsubscriptionerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationissuesetsubscriptionissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationissuesetsubscriptionissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.issueSetWeight`
|
||||
|
||||
|
@ -2711,8 +2711,8 @@ Input type: `IssueSetWeightInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetweightclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetweightiid"></a>`iid` | [`String!`](#string) | The IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetweightprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the issue to mutate is in. |
|
||||
| <a id="mutationissuesetweightiid"></a>`iid` | [`String!`](#string) | IID of the issue to mutate. |
|
||||
| <a id="mutationissuesetweightprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the issue to mutate is in. |
|
||||
| <a id="mutationissuesetweightweight"></a>`weight` | [`Int`](#int) | The desired weight for the issue. If set to null, weight is removed. |
|
||||
|
||||
#### Fields
|
||||
|
@ -2721,7 +2721,7 @@ Input type: `IssueSetWeightInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationissuesetweightclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationissuesetweighterrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationissuesetweightissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationissuesetweightissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.iterationCadenceCreate`
|
||||
|
||||
|
@ -2851,8 +2851,8 @@ Input type: `JiraImportStartInput`
|
|||
| <a id="mutationjiraimportstartclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationjiraimportstartjiraprojectkey"></a>`jiraProjectKey` | [`String!`](#string) | Project key of the importer Jira project. |
|
||||
| <a id="mutationjiraimportstartjiraprojectname"></a>`jiraProjectName` | [`String`](#string) | Project name of the importer Jira project. |
|
||||
| <a id="mutationjiraimportstartprojectpath"></a>`projectPath` | [`ID!`](#id) | The project to import the Jira project into. |
|
||||
| <a id="mutationjiraimportstartusersmapping"></a>`usersMapping` | [`[JiraUsersMappingInputType!]`](#jirausersmappinginputtype) | The mapping of Jira to GitLab users. |
|
||||
| <a id="mutationjiraimportstartprojectpath"></a>`projectPath` | [`ID!`](#id) | Project to import the Jira project into. |
|
||||
| <a id="mutationjiraimportstartusersmapping"></a>`usersMapping` | [`[JiraUsersMappingInputType!]`](#jirausersmappinginputtype) | Mapping of Jira to GitLab users. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -2860,7 +2860,7 @@ Input type: `JiraImportStartInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationjiraimportstartclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationjiraimportstarterrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationjiraimportstartjiraimport"></a>`jiraImport` | [`JiraImport`](#jiraimport) | The Jira import data after mutation. |
|
||||
| <a id="mutationjiraimportstartjiraimport"></a>`jiraImport` | [`JiraImport`](#jiraimport) | Jira import data after mutation. |
|
||||
|
||||
### `Mutation.jiraImportUsers`
|
||||
|
||||
|
@ -2871,8 +2871,8 @@ Input type: `JiraImportUsersInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationjiraimportusersclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationjiraimportusersprojectpath"></a>`projectPath` | [`ID!`](#id) | The project to import the Jira users into. |
|
||||
| <a id="mutationjiraimportusersstartat"></a>`startAt` | [`Int`](#int) | The index of the record the import should started at, default 0 (50 records returned). |
|
||||
| <a id="mutationjiraimportusersprojectpath"></a>`projectPath` | [`ID!`](#id) | Project to import the Jira users into. |
|
||||
| <a id="mutationjiraimportusersstartat"></a>`startAt` | [`Int`](#int) | Index of the record the import should started at, default 0 (50 records returned). |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -2941,7 +2941,7 @@ Input type: `LabelCreateInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationlabelcreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationlabelcreateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationlabelcreatelabel"></a>`label` | [`Label`](#label) | The label after mutation. |
|
||||
| <a id="mutationlabelcreatelabel"></a>`label` | [`Label`](#label) | Label after mutation. |
|
||||
|
||||
### `Mutation.markAsSpamSnippet`
|
||||
|
||||
|
@ -2976,9 +2976,9 @@ Input type: `MergeRequestAcceptInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestacceptclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestacceptcommitmessage"></a>`commitMessage` | [`String`](#string) | Custom merge commit message. |
|
||||
| <a id="mutationmergerequestacceptiid"></a>`iid` | [`String!`](#string) | The IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestacceptprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestacceptsha"></a>`sha` | [`String!`](#string) | The HEAD SHA at the time when this merge was requested. |
|
||||
| <a id="mutationmergerequestacceptiid"></a>`iid` | [`String!`](#string) | IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestacceptprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestacceptsha"></a>`sha` | [`String!`](#string) | HEAD SHA at the time when this merge was requested. |
|
||||
| <a id="mutationmergerequestacceptshouldremovesourcebranch"></a>`shouldRemoveSourceBranch` | [`Boolean`](#boolean) | Should the source branch be removed. |
|
||||
| <a id="mutationmergerequestacceptsquash"></a>`squash` | [`Boolean`](#boolean) | Squash commits on the source branch before merge. |
|
||||
| <a id="mutationmergerequestacceptsquashcommitmessage"></a>`squashCommitMessage` | [`String`](#string) | Custom squash commit message (if squash is true). |
|
||||
|
@ -2990,7 +2990,7 @@ Input type: `MergeRequestAcceptInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestacceptclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestaccepterrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationmergerequestacceptmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | The merge request after mutation. |
|
||||
| <a id="mutationmergerequestacceptmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. |
|
||||
|
||||
### `Mutation.mergeRequestCreate`
|
||||
|
||||
|
@ -3014,7 +3014,7 @@ Input type: `MergeRequestCreateInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestcreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestcreateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationmergerequestcreatemergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | The merge request after mutation. |
|
||||
| <a id="mutationmergerequestcreatemergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. |
|
||||
|
||||
### `Mutation.mergeRequestReviewerRereview`
|
||||
|
||||
|
@ -3025,9 +3025,9 @@ Input type: `MergeRequestReviewerRereviewInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestreviewerrereviewclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestreviewerrereviewiid"></a>`iid` | [`String!`](#string) | The IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestreviewerrereviewprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestreviewerrereviewuserid"></a>`userId` | [`UserID!`](#userid) | The user ID for the user that has been requested for a new review. |
|
||||
| <a id="mutationmergerequestreviewerrereviewiid"></a>`iid` | [`String!`](#string) | IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestreviewerrereviewprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestreviewerrereviewuserid"></a>`userId` | [`UserID!`](#userid) | User ID for the user that has been requested for a new review. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -3035,7 +3035,7 @@ Input type: `MergeRequestReviewerRereviewInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestreviewerrereviewclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestreviewerrereviewerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationmergerequestreviewerrereviewmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | The merge request after mutation. |
|
||||
| <a id="mutationmergerequestreviewerrereviewmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. |
|
||||
|
||||
### `Mutation.mergeRequestSetAssignees`
|
||||
|
||||
|
@ -3045,11 +3045,11 @@ Input type: `MergeRequestSetAssigneesInput`
|
|||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetassigneesassigneeusernames"></a>`assigneeUsernames` | [`[String!]!`](#string) | The usernames to assign to the resource. Replaces existing assignees by default. |
|
||||
| <a id="mutationmergerequestsetassigneesassigneeusernames"></a>`assigneeUsernames` | [`[String!]!`](#string) | Usernames to assign to the resource. Replaces existing assignees by default. |
|
||||
| <a id="mutationmergerequestsetassigneesclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetassigneesiid"></a>`iid` | [`String!`](#string) | The IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetassigneesoperationmode"></a>`operationMode` | [`MutationOperationMode`](#mutationoperationmode) | The operation to perform. Defaults to REPLACE. |
|
||||
| <a id="mutationmergerequestsetassigneesprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestsetassigneesiid"></a>`iid` | [`String!`](#string) | IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetassigneesoperationmode"></a>`operationMode` | [`MutationOperationMode`](#mutationoperationmode) | Operation to perform. Defaults to REPLACE. |
|
||||
| <a id="mutationmergerequestsetassigneesprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the merge request to mutate is in. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -3057,7 +3057,7 @@ Input type: `MergeRequestSetAssigneesInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetassigneesclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetassigneeserrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationmergerequestsetassigneesmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | The merge request after mutation. |
|
||||
| <a id="mutationmergerequestsetassigneesmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. |
|
||||
|
||||
### `Mutation.mergeRequestSetDraft`
|
||||
|
||||
|
@ -3069,8 +3069,8 @@ Input type: `MergeRequestSetDraftInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetdraftclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetdraftdraft"></a>`draft` | [`Boolean!`](#boolean) | Whether or not to set the merge request as a draft. |
|
||||
| <a id="mutationmergerequestsetdraftiid"></a>`iid` | [`String!`](#string) | The IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetdraftprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestsetdraftiid"></a>`iid` | [`String!`](#string) | IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetdraftprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the merge request to mutate is in. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -3078,7 +3078,7 @@ Input type: `MergeRequestSetDraftInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetdraftclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetdrafterrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationmergerequestsetdraftmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | The merge request after mutation. |
|
||||
| <a id="mutationmergerequestsetdraftmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. |
|
||||
|
||||
### `Mutation.mergeRequestSetLabels`
|
||||
|
||||
|
@ -3089,10 +3089,10 @@ Input type: `MergeRequestSetLabelsInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetlabelsclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetlabelsiid"></a>`iid` | [`String!`](#string) | The IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetlabelslabelids"></a>`labelIds` | [`[LabelID!]!`](#labelid) | The Label IDs to set. Replaces existing labels by default. |
|
||||
| <a id="mutationmergerequestsetlabelsiid"></a>`iid` | [`String!`](#string) | IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetlabelslabelids"></a>`labelIds` | [`[LabelID!]!`](#labelid) | Label IDs to set. Replaces existing labels by default. |
|
||||
| <a id="mutationmergerequestsetlabelsoperationmode"></a>`operationMode` | [`MutationOperationMode`](#mutationoperationmode) | Changes the operation mode. Defaults to REPLACE. |
|
||||
| <a id="mutationmergerequestsetlabelsprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestsetlabelsprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the merge request to mutate is in. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -3100,7 +3100,7 @@ Input type: `MergeRequestSetLabelsInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetlabelsclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetlabelserrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationmergerequestsetlabelsmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | The merge request after mutation. |
|
||||
| <a id="mutationmergerequestsetlabelsmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. |
|
||||
|
||||
### `Mutation.mergeRequestSetLocked`
|
||||
|
||||
|
@ -3111,9 +3111,9 @@ Input type: `MergeRequestSetLockedInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetlockedclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetlockediid"></a>`iid` | [`String!`](#string) | The IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetlockediid"></a>`iid` | [`String!`](#string) | IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetlockedlocked"></a>`locked` | [`Boolean!`](#boolean) | Whether or not to lock the merge request. |
|
||||
| <a id="mutationmergerequestsetlockedprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestsetlockedprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the merge request to mutate is in. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -3121,7 +3121,7 @@ Input type: `MergeRequestSetLockedInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetlockedclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetlockederrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationmergerequestsetlockedmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | The merge request after mutation. |
|
||||
| <a id="mutationmergerequestsetlockedmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. |
|
||||
|
||||
### `Mutation.mergeRequestSetMilestone`
|
||||
|
||||
|
@ -3132,9 +3132,9 @@ Input type: `MergeRequestSetMilestoneInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetmilestoneclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetmilestoneiid"></a>`iid` | [`String!`](#string) | The IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetmilestonemilestoneid"></a>`milestoneId` | [`MilestoneID`](#milestoneid) | The milestone to assign to the merge request. |
|
||||
| <a id="mutationmergerequestsetmilestoneprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestsetmilestoneiid"></a>`iid` | [`String!`](#string) | IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetmilestonemilestoneid"></a>`milestoneId` | [`MilestoneID`](#milestoneid) | Milestone to assign to the merge request. |
|
||||
| <a id="mutationmergerequestsetmilestoneprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the merge request to mutate is in. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -3142,7 +3142,7 @@ Input type: `MergeRequestSetMilestoneInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetmilestoneclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetmilestoneerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationmergerequestsetmilestonemergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | The merge request after mutation. |
|
||||
| <a id="mutationmergerequestsetmilestonemergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. |
|
||||
|
||||
### `Mutation.mergeRequestSetSubscription`
|
||||
|
||||
|
@ -3153,9 +3153,9 @@ Input type: `MergeRequestSetSubscriptionInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetsubscriptionclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetsubscriptioniid"></a>`iid` | [`String!`](#string) | The IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetsubscriptionprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestsetsubscriptionsubscribedstate"></a>`subscribedState` | [`Boolean!`](#boolean) | The desired state of the subscription. |
|
||||
| <a id="mutationmergerequestsetsubscriptioniid"></a>`iid` | [`String!`](#string) | IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetsubscriptionprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestsetsubscriptionsubscribedstate"></a>`subscribedState` | [`Boolean!`](#boolean) | Desired state of the subscription. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -3163,7 +3163,7 @@ Input type: `MergeRequestSetSubscriptionInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetsubscriptionclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetsubscriptionerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationmergerequestsetsubscriptionmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | The merge request after mutation. |
|
||||
| <a id="mutationmergerequestsetsubscriptionmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. |
|
||||
|
||||
### `Mutation.mergeRequestSetWip`
|
||||
|
||||
|
@ -3178,8 +3178,8 @@ Input type: `MergeRequestSetWipInput`
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetwipclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetwipiid"></a>`iid` | [`String!`](#string) | The IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetwipprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestsetwipiid"></a>`iid` | [`String!`](#string) | IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestsetwipprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestsetwipwip"></a>`wip` | [`Boolean!`](#boolean) | Whether or not to set the merge request as a draft. |
|
||||
|
||||
#### Fields
|
||||
|
@ -3188,7 +3188,7 @@ Input type: `MergeRequestSetWipInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestsetwipclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestsetwiperrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationmergerequestsetwipmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | The merge request after mutation. |
|
||||
| <a id="mutationmergerequestsetwipmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. |
|
||||
|
||||
### `Mutation.mergeRequestUpdate`
|
||||
|
||||
|
@ -3202,9 +3202,9 @@ Input type: `MergeRequestUpdateInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestupdateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestupdatedescription"></a>`description` | [`String`](#string) | Description of the merge request (Markdown rendered as HTML for caching). |
|
||||
| <a id="mutationmergerequestupdateiid"></a>`iid` | [`String!`](#string) | The IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestupdateprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestupdatestate"></a>`state` | [`MergeRequestNewState`](#mergerequestnewstate) | The action to perform to change the state. |
|
||||
| <a id="mutationmergerequestupdateiid"></a>`iid` | [`String!`](#string) | IID of the merge request to mutate. |
|
||||
| <a id="mutationmergerequestupdateprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the merge request to mutate is in. |
|
||||
| <a id="mutationmergerequestupdatestate"></a>`state` | [`MergeRequestNewState`](#mergerequestnewstate) | Action to perform to change the state. |
|
||||
| <a id="mutationmergerequestupdatetargetbranch"></a>`targetBranch` | [`String`](#string) | Target branch of the merge request. |
|
||||
| <a id="mutationmergerequestupdatetitle"></a>`title` | [`String`](#string) | Title of the merge request. |
|
||||
|
||||
|
@ -3214,7 +3214,7 @@ Input type: `MergeRequestUpdateInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmergerequestupdateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmergerequestupdateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationmergerequestupdatemergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | The merge request after mutation. |
|
||||
| <a id="mutationmergerequestupdatemergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. |
|
||||
|
||||
### `Mutation.namespaceIncreaseStorageTemporarily`
|
||||
|
||||
|
@ -3541,8 +3541,8 @@ Input type: `PromoteToEpicInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationpromotetoepicclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationpromotetoepicgrouppath"></a>`groupPath` | [`ID`](#id) | The group the promoted epic will belong to. |
|
||||
| <a id="mutationpromotetoepiciid"></a>`iid` | [`String!`](#string) | The IID of the issue to mutate. |
|
||||
| <a id="mutationpromotetoepicprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the issue to mutate is in. |
|
||||
| <a id="mutationpromotetoepiciid"></a>`iid` | [`String!`](#string) | IID of the issue to mutate. |
|
||||
| <a id="mutationpromotetoepicprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the issue to mutate is in. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -3551,7 +3551,7 @@ Input type: `PromoteToEpicInput`
|
|||
| <a id="mutationpromotetoepicclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationpromotetoepicepic"></a>`epic` | [`Epic`](#epic) | The epic after issue promotion. |
|
||||
| <a id="mutationpromotetoepicerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationpromotetoepicissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationpromotetoepicissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.releaseAssetLinkCreate`
|
||||
|
||||
|
@ -4136,14 +4136,14 @@ Input type: `UpdateContainerExpirationPolicyInput`
|
|||
| <a id="mutationupdatecontainerexpirationpolicynameregex"></a>`nameRegex` | [`UntrustedRegexp`](#untrustedregexp) | Tags with names matching this regex pattern will expire. |
|
||||
| <a id="mutationupdatecontainerexpirationpolicynameregexkeep"></a>`nameRegexKeep` | [`UntrustedRegexp`](#untrustedregexp) | Tags with names matching this regex pattern will be preserved. |
|
||||
| <a id="mutationupdatecontainerexpirationpolicyolderthan"></a>`olderThan` | [`ContainerExpirationPolicyOlderThanEnum`](#containerexpirationpolicyolderthanenum) | Tags older that this will expire. |
|
||||
| <a id="mutationupdatecontainerexpirationpolicyprojectpath"></a>`projectPath` | [`ID!`](#id) | The project path where the container expiration policy is located. |
|
||||
| <a id="mutationupdatecontainerexpirationpolicyprojectpath"></a>`projectPath` | [`ID!`](#id) | Project path where the container expiration policy is located. |
|
||||
|
||||
#### Fields
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationupdatecontainerexpirationpolicyclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationupdatecontainerexpirationpolicycontainerexpirationpolicy"></a>`containerExpirationPolicy` | [`ContainerExpirationPolicy`](#containerexpirationpolicy) | The container expiration policy after mutation. |
|
||||
| <a id="mutationupdatecontainerexpirationpolicycontainerexpirationpolicy"></a>`containerExpirationPolicy` | [`ContainerExpirationPolicy`](#containerexpirationpolicy) | Container expiration policy after mutation. |
|
||||
| <a id="mutationupdatecontainerexpirationpolicyerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
|
||||
### `Mutation.updateEpic`
|
||||
|
@ -4231,19 +4231,19 @@ Input type: `UpdateIssueInput`
|
|||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationupdateissueaddlabelids"></a>`addLabelIds` | [`[ID!]`](#id) | The IDs of labels to be added to the issue. |
|
||||
| <a id="mutationupdateissueaddlabelids"></a>`addLabelIds` | [`[ID!]`](#id) | IDs of labels to be added to the issue. |
|
||||
| <a id="mutationupdateissueclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationupdateissueconfidential"></a>`confidential` | [`Boolean`](#boolean) | Indicates the issue is confidential. |
|
||||
| <a id="mutationupdateissuedescription"></a>`description` | [`String`](#string) | Description of the issue. |
|
||||
| <a id="mutationupdateissueduedate"></a>`dueDate` | [`ISO8601Date`](#iso8601date) | Due date of the issue. |
|
||||
| <a id="mutationupdateissueepicid"></a>`epicId` | [`EpicID`](#epicid) | The ID of the parent epic. NULL when removing the association. |
|
||||
| <a id="mutationupdateissuehealthstatus"></a>`healthStatus` | [`HealthStatus`](#healthstatus) | The desired health status. |
|
||||
| <a id="mutationupdateissueiid"></a>`iid` | [`String!`](#string) | The IID of the issue to mutate. |
|
||||
| <a id="mutationupdateissuelabelids"></a>`labelIds` | [`[ID!]`](#id) | The IDs of labels to be set. Replaces existing issue labels. |
|
||||
| <a id="mutationupdateissueiid"></a>`iid` | [`String!`](#string) | IID of the issue to mutate. |
|
||||
| <a id="mutationupdateissuelabelids"></a>`labelIds` | [`[ID!]`](#id) | IDs of labels to be set. Replaces existing issue labels. |
|
||||
| <a id="mutationupdateissuelocked"></a>`locked` | [`Boolean`](#boolean) | Indicates discussion is locked on the issue. |
|
||||
| <a id="mutationupdateissuemilestoneid"></a>`milestoneId` | [`ID`](#id) | The ID of the milestone to assign to the issue. On update milestone will be removed if set to null. |
|
||||
| <a id="mutationupdateissueprojectpath"></a>`projectPath` | [`ID!`](#id) | The project the issue to mutate is in. |
|
||||
| <a id="mutationupdateissueremovelabelids"></a>`removeLabelIds` | [`[ID!]`](#id) | The IDs of labels to be removed from the issue. |
|
||||
| <a id="mutationupdateissuemilestoneid"></a>`milestoneId` | [`ID`](#id) | ID of the milestone to assign to the issue. On update milestone will be removed if set to null. |
|
||||
| <a id="mutationupdateissueprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the issue to mutate is in. |
|
||||
| <a id="mutationupdateissueremovelabelids"></a>`removeLabelIds` | [`[ID!]`](#id) | IDs of labels to be removed from the issue. |
|
||||
| <a id="mutationupdateissuestateevent"></a>`stateEvent` | [`IssueStateEvent`](#issuestateevent) | Close or reopen an issue. |
|
||||
| <a id="mutationupdateissuetitle"></a>`title` | [`String`](#string) | Title of the issue. |
|
||||
| <a id="mutationupdateissuetype"></a>`type` | [`IssueType`](#issuetype) | Type of the issue. |
|
||||
|
@ -4255,7 +4255,7 @@ Input type: `UpdateIssueInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationupdateissueclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationupdateissueerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationupdateissueissue"></a>`issue` | [`Issue`](#issue) | The issue after mutation. |
|
||||
| <a id="mutationupdateissueissue"></a>`issue` | [`Issue`](#issue) | Issue after mutation. |
|
||||
|
||||
### `Mutation.updateIteration`
|
||||
|
||||
|
@ -4294,7 +4294,7 @@ Input type: `UpdateNamespacePackageSettingsInput`
|
|||
| <a id="mutationupdatenamespacepackagesettingsgenericduplicatesallowed"></a>`genericDuplicatesAllowed` | [`Boolean`](#boolean) | Indicates whether duplicate generic packages are allowed for this namespace. |
|
||||
| <a id="mutationupdatenamespacepackagesettingsmavenduplicateexceptionregex"></a>`mavenDuplicateExceptionRegex` | [`UntrustedRegexp`](#untrustedregexp) | When maven_duplicates_allowed is false, you can publish duplicate packages with names that match this regex. Otherwise, this setting has no effect. |
|
||||
| <a id="mutationupdatenamespacepackagesettingsmavenduplicatesallowed"></a>`mavenDuplicatesAllowed` | [`Boolean`](#boolean) | Indicates whether duplicate Maven packages are allowed for this namespace. |
|
||||
| <a id="mutationupdatenamespacepackagesettingsnamespacepath"></a>`namespacePath` | [`ID!`](#id) | The namespace path where the namespace package setting is located. |
|
||||
| <a id="mutationupdatenamespacepackagesettingsnamespacepath"></a>`namespacePath` | [`ID!`](#id) | Namespace path where the namespace package setting is located. |
|
||||
|
||||
#### Fields
|
||||
|
||||
|
@ -4302,7 +4302,7 @@ Input type: `UpdateNamespacePackageSettingsInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationupdatenamespacepackagesettingsclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationupdatenamespacepackagesettingserrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationupdatenamespacepackagesettingspackagesettings"></a>`packageSettings` | [`PackageSettings`](#packagesettings) | The namespace package setting after mutation. |
|
||||
| <a id="mutationupdatenamespacepackagesettingspackagesettings"></a>`packageSettings` | [`PackageSettings`](#packagesettings) | Namespace package setting after mutation. |
|
||||
|
||||
### `Mutation.updateNote`
|
||||
|
||||
|
|
|
@ -100,8 +100,8 @@ artifacts and log. You must be:
|
|||
To delete a job:
|
||||
|
||||
1. Go to a job's detail page.
|
||||
1. At the top right of the job's log, select the trash icon.
|
||||
1. Confirm the deletion.
|
||||
1. On the top right of the job's log, select **Erase job log** (**{remove}**).
|
||||
1. On the confirmation dialog, select **OK**.
|
||||
|
||||
## Retrieve job artifacts for other projects
|
||||
|
||||
|
@ -186,7 +186,9 @@ Keeping the latest artifacts can use a large amount of storage space in projects
|
|||
with a lot of jobs or large artifacts. If the latest artifacts are not needed in
|
||||
a project, you can disable this behavior to save space:
|
||||
|
||||
1. Go to the project's **Settings > CI/CD > Artifacts**.
|
||||
1. On the top bar, select **Menu > Projects** and find your project.
|
||||
1. On the left sidebar, select **Settings > CI/CD**.
|
||||
1. Expand **Artifacts**.
|
||||
1. Clear the **Keep artifacts from most recent successful jobs** checkbox.
|
||||
|
||||
You can disable this behavior for all projects on a self-managed instance in the
|
||||
|
|
|
@ -436,6 +436,32 @@ include:
|
|||
For an example of how you can include these predefined variables, and the variables' impact on CI/CD jobs,
|
||||
see this [CI/CD variable demo](https://youtu.be/4XR8gw3Pkos).
|
||||
|
||||
There is a [related issue](https://gitlab.com/gitlab-org/gitlab/-/issues/337633)
|
||||
that proposes expanding this feature to support more variables.
|
||||
|
||||
#### `rules` with `include`
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/276515) in GitLab 14.2.
|
||||
|
||||
NOTE:
|
||||
On self-managed GitLab, by default this feature is not available. To make it available,
|
||||
ask an administrator to [enable the `ci_include_rules` flag](../../administration/feature_flags.md).
|
||||
On GitLab.com, this feature is not available. The feature is not ready for production use.
|
||||
|
||||
You can use [`rules`](#rules) with `include` to conditionally include other configuration files.
|
||||
You can only use `rules:if` in `include` with [certain variables](#variables-with-include).
|
||||
|
||||
```yaml
|
||||
include:
|
||||
- local: builds.yml
|
||||
rules:
|
||||
- if: '$INCLUDE_BUILDS == "true"'
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script: exit 0
|
||||
```
|
||||
|
||||
#### `include:local`
|
||||
|
||||
Use `include:local` to include a file that is in the same repository as the `.gitlab-ci.yml` file.
|
||||
|
|
|
@ -9,8 +9,10 @@ module Gitlab
|
|||
#
|
||||
class Include < ::Gitlab::Config::Entry::Node
|
||||
include ::Gitlab::Config::Entry::Validatable
|
||||
include ::Gitlab::Config::Entry::Configurable
|
||||
include ::Gitlab::Config::Entry::Attributable
|
||||
|
||||
ALLOWED_KEYS = %i[local file remote template artifact job project ref].freeze
|
||||
ALLOWED_KEYS = %i[local file remote template artifact job project ref rules].freeze
|
||||
|
||||
validations do
|
||||
validates :config, hash_or_string: true
|
||||
|
@ -27,6 +29,20 @@ module Gitlab
|
|||
errors.add(:config, "must specify the file where to fetch the config from")
|
||||
end
|
||||
end
|
||||
|
||||
with_options allow_nil: true do
|
||||
validates :rules, array_of_hashes: true
|
||||
end
|
||||
end
|
||||
|
||||
entry :rules, ::Gitlab::Ci::Config::Entry::Include::Rules,
|
||||
description: 'List of evaluable Rules to determine file inclusion.',
|
||||
inherit: false
|
||||
|
||||
attributes :rules
|
||||
|
||||
def skip_config_hash_validation?
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
28
lib/gitlab/ci/config/entry/include/rules.rb
Normal file
28
lib/gitlab/ci/config/entry/include/rules.rb
Normal file
|
@ -0,0 +1,28 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Ci
|
||||
class Config
|
||||
module Entry
|
||||
class Include
|
||||
class Rules < ::Gitlab::Config::Entry::ComposableArray
|
||||
include ::Gitlab::Config::Entry::Validatable
|
||||
|
||||
validations do
|
||||
validates :config, presence: true
|
||||
validates :config, type: Array
|
||||
end
|
||||
|
||||
def value
|
||||
@config
|
||||
end
|
||||
|
||||
def composable_class
|
||||
Entry::Include::Rules::Rule
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
30
lib/gitlab/ci/config/entry/include/rules/rule.rb
Normal file
30
lib/gitlab/ci/config/entry/include/rules/rule.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Ci
|
||||
class Config
|
||||
module Entry
|
||||
class Include
|
||||
class Rules::Rule < ::Gitlab::Config::Entry::Node
|
||||
include ::Gitlab::Config::Entry::Validatable
|
||||
include ::Gitlab::Config::Entry::Attributable
|
||||
|
||||
ALLOWED_KEYS = %i[if].freeze
|
||||
|
||||
attributes :if
|
||||
|
||||
validations do
|
||||
validates :config, presence: true
|
||||
validates :config, type: { with: Hash }
|
||||
validates :config, allowed_keys: ALLOWED_KEYS
|
||||
|
||||
with_options allow_nil: true do
|
||||
validates :if, expression: true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
10
lib/gitlab/ci/config/external/mapper.rb
vendored
10
lib/gitlab/ci/config/external/mapper.rb
vendored
|
@ -33,6 +33,7 @@ module Gitlab
|
|||
locations
|
||||
.compact
|
||||
.map(&method(:normalize_location))
|
||||
.filter_map(&method(:verify_rules))
|
||||
.flat_map(&method(:expand_project_files))
|
||||
.flat_map(&method(:expand_wildcard_paths))
|
||||
.map(&method(:expand_variables))
|
||||
|
@ -56,6 +57,15 @@ module Gitlab
|
|||
end
|
||||
end
|
||||
|
||||
def verify_rules(location)
|
||||
# Behaves like there is no `rules`
|
||||
return location unless ::Feature.enabled?(:ci_include_rules, context.project, default_enabled: :yaml)
|
||||
|
||||
return unless Rules.new(location[:rules]).evaluate(context).pass?
|
||||
|
||||
location
|
||||
end
|
||||
|
||||
def expand_project_files(location)
|
||||
return location unless location[:project]
|
||||
|
||||
|
|
31
lib/gitlab/ci/config/external/rules.rb
vendored
Normal file
31
lib/gitlab/ci/config/external/rules.rb
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Ci
|
||||
class Config
|
||||
module External
|
||||
class Rules
|
||||
def initialize(rule_hashes)
|
||||
@rule_list = Build::Rules::Rule.fabricate_list(rule_hashes)
|
||||
end
|
||||
|
||||
def evaluate(context)
|
||||
Result.new(@rule_list.nil? || match_rule(context))
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def match_rule(context)
|
||||
@rule_list.find { |rule| rule.matches?(nil, context) }
|
||||
end
|
||||
|
||||
Result = Struct.new(:result) do
|
||||
def pass?
|
||||
!!result
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -38,6 +38,7 @@ module Gitlab
|
|||
allow_webpack_dev_server(settings_hash) if Rails.env.development?
|
||||
allow_cdn(settings_hash, cdn_host) if cdn_host.present?
|
||||
allow_customersdot(settings_hash) if Rails.env.development? && ENV['CUSTOMER_PORTAL_URL'].present?
|
||||
allow_sentry(settings_hash) if Gitlab.config.sentry&.enabled && Gitlab.config.sentry&.clientside_dsn
|
||||
|
||||
settings_hash
|
||||
end
|
||||
|
@ -90,6 +91,14 @@ module Gitlab
|
|||
|
||||
append_to_directive(settings_hash, 'frame_src', customersdot_host)
|
||||
end
|
||||
|
||||
def self.allow_sentry(settings_hash)
|
||||
sentry_dsn = Gitlab.config.sentry.clientside_dsn
|
||||
sentry_uri = URI(sentry_dsn)
|
||||
sentry_uri.user = nil
|
||||
|
||||
append_to_directive(settings_hash, 'connect_src', sentry_uri.to_s)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,8 +9,8 @@ module Gitlab
|
|||
|
||||
attr_reader :observations
|
||||
|
||||
def initialize(observers = ::Gitlab::Database::Migrations::Observers.all_observers)
|
||||
@observers = observers
|
||||
def initialize(observer_classes = ::Gitlab::Database::Migrations::Observers.all_observers)
|
||||
@observer_classes = observer_classes
|
||||
@observations = []
|
||||
end
|
||||
|
||||
|
@ -18,9 +18,11 @@ module Gitlab
|
|||
observation = Observation.new(version, name)
|
||||
observation.success = true
|
||||
|
||||
observers = observer_classes.map { |c| c.new(observation) }
|
||||
|
||||
exception = nil
|
||||
|
||||
on_each_observer { |observer| observer.before }
|
||||
on_each_observer(observers) { |observer| observer.before }
|
||||
|
||||
observation.walltime = Benchmark.realtime do
|
||||
yield
|
||||
|
@ -29,8 +31,8 @@ module Gitlab
|
|||
observation.success = false
|
||||
end
|
||||
|
||||
on_each_observer { |observer| observer.after }
|
||||
on_each_observer { |observer| observer.record(observation) }
|
||||
on_each_observer(observers) { |observer| observer.after }
|
||||
on_each_observer(observers) { |observer| observer.record }
|
||||
|
||||
record_observation(observation)
|
||||
|
||||
|
@ -41,13 +43,13 @@ module Gitlab
|
|||
|
||||
private
|
||||
|
||||
attr_reader :observers
|
||||
attr_reader :observer_classes
|
||||
|
||||
def record_observation(observation)
|
||||
@observations << observation
|
||||
end
|
||||
|
||||
def on_each_observer(&block)
|
||||
def on_each_observer(observers, &block)
|
||||
observers.each do |observer|
|
||||
yield observer
|
||||
rescue StandardError => e
|
||||
|
|
|
@ -6,10 +6,10 @@ module Gitlab
|
|||
module Observers
|
||||
def self.all_observers
|
||||
[
|
||||
TotalDatabaseSizeChange.new,
|
||||
QueryStatistics.new,
|
||||
QueryLog.new,
|
||||
QueryDetails.new
|
||||
TotalDatabaseSizeChange,
|
||||
QueryStatistics,
|
||||
QueryLog,
|
||||
QueryDetails
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,10 +5,11 @@ module Gitlab
|
|||
module Migrations
|
||||
module Observers
|
||||
class MigrationObserver
|
||||
attr_reader :connection
|
||||
attr_reader :connection, :observation
|
||||
|
||||
def initialize
|
||||
def initialize(observation)
|
||||
@connection = ActiveRecord::Base.connection
|
||||
@observation = observation
|
||||
end
|
||||
|
||||
def before
|
||||
|
@ -19,7 +20,7 @@ module Gitlab
|
|||
# implement in subclass
|
||||
end
|
||||
|
||||
def record(observation)
|
||||
def record
|
||||
raise NotImplementedError, 'implement in subclass'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ module Gitlab
|
|||
@file.close
|
||||
end
|
||||
|
||||
def record(observation)
|
||||
def record
|
||||
File.rename(@file_path, File.join(Instrumentation::RESULT_DIR, "#{observation.version}_#{observation.name}-query-details.json"))
|
||||
end
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ module Gitlab
|
|||
@logger.close
|
||||
end
|
||||
|
||||
def record(observation)
|
||||
def record
|
||||
File.rename(@log_file_path, File.join(Instrumentation::RESULT_DIR, "#{observation.version}_#{observation.name}.log"))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -16,7 +16,7 @@ module Gitlab
|
|||
connection.execute('select pg_stat_statements_reset()')
|
||||
end
|
||||
|
||||
def record(observation)
|
||||
def record
|
||||
return unless enabled?
|
||||
|
||||
observation.query_statistics = connection.execute(<<~SQL)
|
||||
|
|
|
@ -13,7 +13,7 @@ module Gitlab
|
|||
@size_after = get_total_database_size
|
||||
end
|
||||
|
||||
def record(observation)
|
||||
def record
|
||||
return unless @size_after && @size_before
|
||||
|
||||
observation.total_database_size_change = @size_after - @size_before
|
||||
|
|
|
@ -35,10 +35,7 @@ module QA
|
|||
end
|
||||
|
||||
def fabricate_via_api!
|
||||
response = post(Runtime::API::Request.new(api_client, api_post_path).url, api_post_body)
|
||||
@import_id = parse_body(response)[:id]
|
||||
|
||||
"#{gitlab_address}/#{full_path}"
|
||||
resource_web_url(api_post)
|
||||
end
|
||||
|
||||
def api_post_path
|
||||
|
@ -71,6 +68,18 @@ module QA
|
|||
|
||||
parse_body(response)[:status]
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def transform_api_resource(api_resource)
|
||||
return api_resource if api_resource[:web_url]
|
||||
|
||||
# override transformation only for /bulk_imports endpoint which doesn't have web_url in response and
|
||||
# ignore others so import_id is not overwritten incorrectly
|
||||
api_resource[:web_url] = "#{gitlab_address}/#{full_path}"
|
||||
api_resource[:import_id] = api_resource[:id]
|
||||
api_resource
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -78,20 +78,16 @@ module QA
|
|||
'imports group with subgroups and labels',
|
||||
testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1871'
|
||||
) do
|
||||
Page::Group::BulkImport.perform do |import_page|
|
||||
imported_group
|
||||
expect { imported_group.import_status }.to(
|
||||
eventually_eq('finished').within(max_duration: 300, sleep_interval: 2)
|
||||
)
|
||||
|
||||
expect { imported_group.import_status }.to(
|
||||
eventually_eq('finished').within(max_duration: 300, sleep_interval: 2)
|
||||
)
|
||||
aggregate_failures do
|
||||
expect(imported_group.reload!).to eq(source_group)
|
||||
expect(imported_group.labels).to include(*source_group.labels)
|
||||
|
||||
aggregate_failures do
|
||||
expect(imported_group.reload!).to eq(source_group)
|
||||
expect(imported_group.labels).to include(*source_group.labels)
|
||||
|
||||
expect(imported_subgroup.reload!).to eq(subgroup)
|
||||
expect(imported_subgroup.labels).to include(*subgroup.labels)
|
||||
end
|
||||
expect(imported_subgroup.reload!).to eq(subgroup)
|
||||
expect(imported_subgroup.labels).to include(*subgroup.labels)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
90
spec/lib/gitlab/ci/config/entry/include/rules/rule_spec.rb
Normal file
90
spec/lib/gitlab/ci/config/entry/include/rules/rule_spec.rb
Normal file
|
@ -0,0 +1,90 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'fast_spec_helper'
|
||||
|
||||
RSpec.describe Gitlab::Ci::Config::Entry::Include::Rules::Rule do
|
||||
let(:factory) do
|
||||
Gitlab::Config::Entry::Factory.new(described_class)
|
||||
.value(config)
|
||||
end
|
||||
|
||||
subject(:entry) { factory.create! }
|
||||
|
||||
describe '.new' do
|
||||
shared_examples 'an invalid config' do |error_message|
|
||||
it { is_expected.not_to be_valid }
|
||||
|
||||
it 'has errors' do
|
||||
expect(entry.errors).to include(error_message)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when specifying an if: clause' do
|
||||
let(:config) { { if: '$THIS || $THAT' } }
|
||||
|
||||
it { is_expected.to be_valid }
|
||||
end
|
||||
|
||||
context 'using a list of multiple expressions' do
|
||||
let(:config) { { if: ['$MY_VAR == "this"', '$YOUR_VAR == "that"'] } }
|
||||
|
||||
it_behaves_like 'an invalid config', /invalid expression syntax/
|
||||
end
|
||||
|
||||
context 'when specifying an invalid if: clause expression' do
|
||||
let(:config) { { if: ['$MY_VAR =='] } }
|
||||
|
||||
it_behaves_like 'an invalid config', /invalid expression syntax/
|
||||
end
|
||||
|
||||
context 'when specifying an if: clause expression with an invalid token' do
|
||||
let(:config) { { if: ['$MY_VAR == 123'] } }
|
||||
|
||||
it_behaves_like 'an invalid config', /invalid expression syntax/
|
||||
end
|
||||
|
||||
context 'when using invalid regex in an if: clause' do
|
||||
let(:config) { { if: ['$MY_VAR =~ /some ( thing/'] } }
|
||||
|
||||
it_behaves_like 'an invalid config', /invalid expression syntax/
|
||||
end
|
||||
|
||||
context 'when using an if: clause with lookahead regex character "?"' do
|
||||
let(:config) { { if: '$CI_COMMIT_REF =~ /^(?!master).+/' } }
|
||||
|
||||
context 'when allow_unsafe_ruby_regexp is disabled' do
|
||||
it_behaves_like 'an invalid config', /invalid expression syntax/
|
||||
end
|
||||
end
|
||||
|
||||
context 'when specifying unknown policy' do
|
||||
let(:config) { { invalid: :something } }
|
||||
|
||||
it_behaves_like 'an invalid config', /unknown keys: invalid/
|
||||
end
|
||||
|
||||
context 'when clause is empty' do
|
||||
let(:config) { {} }
|
||||
|
||||
it_behaves_like 'an invalid config', /can't be blank/
|
||||
end
|
||||
|
||||
context 'when policy strategy does not match' do
|
||||
let(:config) { 'string strategy' }
|
||||
|
||||
it_behaves_like 'an invalid config', /should be a hash/
|
||||
end
|
||||
end
|
||||
|
||||
describe '#value' do
|
||||
subject(:value) { entry.value }
|
||||
|
||||
context 'when specifying an if: clause' do
|
||||
let(:config) { { if: '$THIS || $THAT' } }
|
||||
|
||||
it 'returns the config' do
|
||||
expect(subject).to eq(if: '$THIS || $THAT')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
98
spec/lib/gitlab/ci/config/entry/include/rules_spec.rb
Normal file
98
spec/lib/gitlab/ci/config/entry/include/rules_spec.rb
Normal file
|
@ -0,0 +1,98 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'fast_spec_helper'
|
||||
|
||||
RSpec.describe Gitlab::Ci::Config::Entry::Include::Rules do
|
||||
let(:factory) do
|
||||
Gitlab::Config::Entry::Factory.new(described_class)
|
||||
.value(config)
|
||||
end
|
||||
|
||||
subject(:entry) { factory.create! }
|
||||
|
||||
describe '.new' do
|
||||
shared_examples 'a valid config' do
|
||||
it { is_expected.to be_valid }
|
||||
|
||||
context 'when composed' do
|
||||
before do
|
||||
entry.compose!
|
||||
end
|
||||
|
||||
it { is_expected.to be_valid }
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples 'an invalid config' do |error_message|
|
||||
it { is_expected.not_to be_valid }
|
||||
|
||||
it 'has errors' do
|
||||
expect(entry.errors).to include(error_message)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with an "if"' do
|
||||
let(:config) do
|
||||
[{ if: '$THIS == "that"' }]
|
||||
end
|
||||
|
||||
it_behaves_like 'a valid config'
|
||||
end
|
||||
|
||||
context 'with a "changes"' do
|
||||
let(:config) do
|
||||
[{ changes: ['filename.txt'] }]
|
||||
end
|
||||
|
||||
context 'when composed' do
|
||||
before do
|
||||
entry.compose!
|
||||
end
|
||||
|
||||
it_behaves_like 'an invalid config', /contains unknown keys: changes/
|
||||
end
|
||||
end
|
||||
|
||||
context 'with a list of two rules' do
|
||||
let(:config) do
|
||||
[
|
||||
{ if: '$THIS == "that"' },
|
||||
{ if: '$SKIP' }
|
||||
]
|
||||
end
|
||||
|
||||
it_behaves_like 'a valid config'
|
||||
end
|
||||
|
||||
context 'without an array' do
|
||||
let(:config) do
|
||||
{ if: '$SKIP' }
|
||||
end
|
||||
|
||||
it_behaves_like 'an invalid config', /should be a array/
|
||||
end
|
||||
end
|
||||
|
||||
describe '#value' do
|
||||
subject(:value) { entry.value }
|
||||
|
||||
context 'with an "if"' do
|
||||
let(:config) do
|
||||
[{ if: '$THIS == "that"' }]
|
||||
end
|
||||
|
||||
it { is_expected.to eq(config) }
|
||||
end
|
||||
|
||||
context 'with a list of two rules' do
|
||||
let(:config) do
|
||||
[
|
||||
{ if: '$THIS == "that"' },
|
||||
{ if: '$SKIP' }
|
||||
]
|
||||
end
|
||||
|
||||
it { is_expected.to eq(config) }
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
require 'fast_spec_helper'
|
||||
|
||||
RSpec.describe ::Gitlab::Ci::Config::Entry::Include do
|
||||
subject(:include_entry) { described_class.new(config) }
|
||||
|
@ -86,6 +86,22 @@ RSpec.describe ::Gitlab::Ci::Config::Entry::Include do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when using with "rules"' do
|
||||
let(:config) { { local: 'test.yml', rules: [{ if: '$VARIABLE' }] } }
|
||||
|
||||
it { is_expected.to be_valid }
|
||||
|
||||
context 'when rules is not an array of hashes' do
|
||||
let(:config) { { local: 'test.yml', rules: ['$VARIABLE'] } }
|
||||
|
||||
it { is_expected.not_to be_valid }
|
||||
|
||||
it 'has specific error' do
|
||||
expect(include_entry.errors).to include('include rules should be an array of hashes')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when value is something else' do
|
||||
|
@ -94,4 +110,26 @@ RSpec.describe ::Gitlab::Ci::Config::Entry::Include do
|
|||
it { is_expected.not_to be_valid }
|
||||
end
|
||||
end
|
||||
|
||||
describe '#value' do
|
||||
subject(:value) { include_entry.value }
|
||||
|
||||
context 'when config is a string' do
|
||||
let(:config) { 'test.yml' }
|
||||
|
||||
it { is_expected.to eq('test.yml') }
|
||||
end
|
||||
|
||||
context 'when config is a hash' do
|
||||
let(:config) { { local: 'test.yml' } }
|
||||
|
||||
it { is_expected.to eq(local: 'test.yml') }
|
||||
end
|
||||
|
||||
context 'when config has "rules"' do
|
||||
let(:config) { { local: 'test.yml', rules: [{ if: '$VARIABLE' }] } }
|
||||
|
||||
it { is_expected.to eq(local: 'test.yml', rules: [{ if: '$VARIABLE' }]) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@ RSpec.describe Gitlab::Ci::Config::External::Mapper do
|
|||
let(:local_file) { '/lib/gitlab/ci/templates/non-existent-file.yml' }
|
||||
let(:remote_url) { 'https://gitlab.com/gitlab-org/gitlab-foss/blob/1234/.gitlab-ci-1.yml' }
|
||||
let(:template_file) { 'Auto-DevOps.gitlab-ci.yml' }
|
||||
let(:context_params) { { project: project, sha: '123456', user: user, variables: project.predefined_variables.to_runner_variables } }
|
||||
let(:context_params) { { project: project, sha: '123456', user: user, variables: project.predefined_variables } }
|
||||
let(:context) { Gitlab::Ci::Config::External::Context.new(**context_params) }
|
||||
|
||||
let(:file_content) do
|
||||
|
@ -348,5 +348,52 @@ RSpec.describe Gitlab::Ci::Config::External::Mapper do
|
|||
expect(subject.map(&:location)).to contain_exactly('myfolder/file1.yml', 'myfolder/file2.yml')
|
||||
end
|
||||
end
|
||||
|
||||
context "when 'include' has rules" do
|
||||
let(:values) do
|
||||
{ include: [{ remote: remote_url },
|
||||
{ local: local_file, rules: [{ if: "$CI_PROJECT_ID == '#{project_id}'" }] }],
|
||||
image: 'ruby:2.7' }
|
||||
end
|
||||
|
||||
context 'when the rules matches' do
|
||||
let(:project_id) { project.id }
|
||||
|
||||
it 'includes the file' do
|
||||
expect(subject).to contain_exactly(an_instance_of(Gitlab::Ci::Config::External::File::Remote),
|
||||
an_instance_of(Gitlab::Ci::Config::External::File::Local))
|
||||
end
|
||||
|
||||
context 'when the FF ci_include_rules is disabled' do
|
||||
before do
|
||||
stub_feature_flags(ci_include_rules: false)
|
||||
end
|
||||
|
||||
it 'includes the file' do
|
||||
expect(subject).to contain_exactly(an_instance_of(Gitlab::Ci::Config::External::File::Remote),
|
||||
an_instance_of(Gitlab::Ci::Config::External::File::Local))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the rules does not match' do
|
||||
let(:project_id) { non_existing_record_id }
|
||||
|
||||
it 'does not include the file' do
|
||||
expect(subject).to contain_exactly(an_instance_of(Gitlab::Ci::Config::External::File::Remote))
|
||||
end
|
||||
|
||||
context 'when the FF ci_include_rules is disabled' do
|
||||
before do
|
||||
stub_feature_flags(ci_include_rules: false)
|
||||
end
|
||||
|
||||
it 'includes the file' do
|
||||
expect(subject).to contain_exactly(an_instance_of(Gitlab::Ci::Config::External::File::Remote),
|
||||
an_instance_of(Gitlab::Ci::Config::External::File::Local))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
35
spec/lib/gitlab/ci/config/external/rules_spec.rb
vendored
Normal file
35
spec/lib/gitlab/ci/config/external/rules_spec.rb
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'fast_spec_helper'
|
||||
|
||||
RSpec.describe Gitlab::Ci::Config::External::Rules do
|
||||
let(:rule_hashes) {}
|
||||
|
||||
subject(:rules) { described_class.new(rule_hashes) }
|
||||
|
||||
describe '#evaluate' do
|
||||
let(:context) { double(variables: {}) }
|
||||
|
||||
subject(:result) { rules.evaluate(context).pass? }
|
||||
|
||||
context 'when there is no rule' do
|
||||
it { is_expected.to eq(true) }
|
||||
end
|
||||
|
||||
context 'when there is a rule' do
|
||||
let(:rule_hashes) { [{ if: '$MY_VAR == "hello"' }] }
|
||||
|
||||
context 'when the rule matches' do
|
||||
let(:context) { double(variables: { MY_VAR: 'hello' }) }
|
||||
|
||||
it { is_expected.to eq(true) }
|
||||
end
|
||||
|
||||
context 'when the rule does not match' do
|
||||
let(:context) { double(variables: { MY_VAR: 'invalid' }) }
|
||||
|
||||
it { is_expected.to eq(false) }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -723,5 +723,33 @@ RSpec.describe Gitlab::Ci::Config do
|
|||
expect(config.to_hash).to eq(composed_hash)
|
||||
end
|
||||
end
|
||||
|
||||
context "when an 'include' has rules" do
|
||||
let(:gitlab_ci_yml) do
|
||||
<<~HEREDOC
|
||||
include:
|
||||
- local: #{local_location}
|
||||
rules:
|
||||
- if: $CI_PROJECT_ID == "#{project_id}"
|
||||
image: ruby:2.7
|
||||
HEREDOC
|
||||
end
|
||||
|
||||
context 'when the rules condition is satisfied' do
|
||||
let(:project_id) { project.id }
|
||||
|
||||
it 'includes the file' do
|
||||
expect(config.to_hash).to include(local_location_hash)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the rules condition is satisfied' do
|
||||
let(:project_id) { non_existing_record_id }
|
||||
|
||||
it 'does not include the file' do
|
||||
expect(config.to_hash).not_to include(local_location_hash)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1152,6 +1152,10 @@ module Gitlab
|
|||
end
|
||||
|
||||
it { is_expected.to be_valid }
|
||||
|
||||
it 'adds the job from the included file' do
|
||||
expect(subject.builds.map { |build| build[:name] }).to contain_exactly('job1', 'rspec')
|
||||
end
|
||||
end
|
||||
|
||||
context "when the included internal file is not present" do
|
||||
|
|
|
@ -61,6 +61,18 @@ RSpec.describe Gitlab::ContentSecurityPolicy::ConfigLoader do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when sentry is configured' do
|
||||
before do
|
||||
stub_sentry_settings
|
||||
end
|
||||
|
||||
it 'adds sentry path to CSP without user' do
|
||||
directives = settings['directives']
|
||||
|
||||
expect(directives['connect_src']).to eq("'self' dummy://example.com/43")
|
||||
end
|
||||
end
|
||||
|
||||
context 'when CUSTOMER_PORTAL_URL is set' do
|
||||
before do
|
||||
stub_env('CUSTOMER_PORTAL_URL', 'https://customers.example.com')
|
||||
|
|
|
@ -13,17 +13,27 @@ RSpec.describe Gitlab::Database::Migrations::Instrumentation do
|
|||
end
|
||||
|
||||
context 'behavior with observers' do
|
||||
subject { described_class.new(observers).observe(version: migration_version, name: migration_name) {} }
|
||||
subject { described_class.new([Gitlab::Database::Migrations::Observers::MigrationObserver]).observe(version: migration_version, name: migration_name) {} }
|
||||
|
||||
let(:observers) { [observer] }
|
||||
let(:observer) { instance_double('Gitlab::Database::Migrations::Observers::MigrationObserver', before: nil, after: nil, record: nil) }
|
||||
|
||||
before do
|
||||
allow(Gitlab::Database::Migrations::Observers::MigrationObserver).to receive(:new).and_return(observer)
|
||||
end
|
||||
|
||||
it 'instantiates observer with observation' do
|
||||
expect(Gitlab::Database::Migrations::Observers::MigrationObserver)
|
||||
.to receive(:new)
|
||||
.with(instance_of(Gitlab::Database::Migrations::Observation)) { |observation| expect(observation.version).to eq(migration_version) }
|
||||
.and_return(observer)
|
||||
|
||||
subject
|
||||
end
|
||||
|
||||
it 'calls #before, #after, #record on given observers' do
|
||||
expect(observer).to receive(:before).ordered
|
||||
expect(observer).to receive(:after).ordered
|
||||
expect(observer).to receive(:record).ordered do |observation|
|
||||
expect(observation.version).to eq(migration_version)
|
||||
end
|
||||
expect(observer).to receive(:record).ordered
|
||||
|
||||
subject
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
RSpec.describe Gitlab::Database::Migrations::Observers::QueryDetails do
|
||||
subject { described_class.new }
|
||||
subject { described_class.new(observation) }
|
||||
|
||||
let(:observation) { Gitlab::Database::Migrations::Observation.new(migration_version, migration_name) }
|
||||
let(:connection) { ActiveRecord::Base.connection }
|
||||
|
@ -50,7 +50,7 @@ RSpec.describe Gitlab::Database::Migrations::Observers::QueryDetails do
|
|||
subject.before
|
||||
run_query
|
||||
subject.after
|
||||
subject.record(observation)
|
||||
subject.record
|
||||
end
|
||||
|
||||
def run_query
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
RSpec.describe Gitlab::Database::Migrations::Observers::QueryLog do
|
||||
subject { described_class.new }
|
||||
subject { described_class.new(observation) }
|
||||
|
||||
let(:observation) { Gitlab::Database::Migrations::Observation.new(migration_version, migration_name) }
|
||||
let(:connection) { ActiveRecord::Base.connection }
|
||||
|
@ -34,6 +34,6 @@ RSpec.describe Gitlab::Database::Migrations::Observers::QueryLog do
|
|||
subject.before
|
||||
connection.execute(query)
|
||||
subject.after
|
||||
subject.record(observation)
|
||||
subject.record
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
require 'spec_helper'
|
||||
|
||||
RSpec.describe Gitlab::Database::Migrations::Observers::QueryStatistics do
|
||||
subject { described_class.new }
|
||||
subject { described_class.new(observation) }
|
||||
|
||||
let(:observation) { Gitlab::Database::Migrations::Observation.new }
|
||||
let(:connection) { ActiveRecord::Base.connection }
|
||||
|
||||
def mock_pgss(enabled: true)
|
||||
|
@ -37,7 +38,6 @@ RSpec.describe Gitlab::Database::Migrations::Observers::QueryStatistics do
|
|||
end
|
||||
|
||||
describe '#record' do
|
||||
let(:observation) { Gitlab::Database::Migrations::Observation.new }
|
||||
let(:result) { double }
|
||||
let(:pgss_query) do
|
||||
<<~SQL
|
||||
|
@ -52,7 +52,7 @@ RSpec.describe Gitlab::Database::Migrations::Observers::QueryStatistics do
|
|||
mock_pgss(enabled: true)
|
||||
expect(connection).to receive(:execute).with(pgss_query).once.and_return(result)
|
||||
|
||||
expect { subject.record(observation) }.to change { observation.query_statistics }.from(nil).to(result)
|
||||
expect { subject.record }.to change { observation.query_statistics }.from(nil).to(result)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -61,7 +61,7 @@ RSpec.describe Gitlab::Database::Migrations::Observers::QueryStatistics do
|
|||
mock_pgss(enabled: false)
|
||||
expect(connection).not_to receive(:execute)
|
||||
|
||||
expect { subject.record(observation) }.not_to change { observation.query_statistics }
|
||||
expect { subject.record }.not_to change { observation.query_statistics }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
RSpec.describe Gitlab::Database::Migrations::Observers::TotalDatabaseSizeChange do
|
||||
subject { described_class.new }
|
||||
subject { described_class.new(observation) }
|
||||
|
||||
let(:observation) { Gitlab::Database::Migrations::Observation.new }
|
||||
let(:connection) { ActiveRecord::Base.connection }
|
||||
|
@ -14,7 +14,7 @@ RSpec.describe Gitlab::Database::Migrations::Observers::TotalDatabaseSizeChange
|
|||
|
||||
subject.before
|
||||
subject.after
|
||||
subject.record(observation)
|
||||
subject.record
|
||||
|
||||
expect(observation.total_database_size_change).to eq(256 - 1024)
|
||||
end
|
||||
|
@ -27,13 +27,13 @@ RSpec.describe Gitlab::Database::Migrations::Observers::TotalDatabaseSizeChange
|
|||
it 'does not record anything if before size is unknown' do
|
||||
subject.after
|
||||
|
||||
expect { subject.record(observation) }.not_to change { observation.total_database_size_change }
|
||||
expect { subject.record }.not_to change { observation.total_database_size_change }
|
||||
end
|
||||
|
||||
it 'does not record anything if after size is unknown' do
|
||||
subject.before
|
||||
|
||||
expect { subject.record(observation) }.not_to change { observation.total_database_size_change }
|
||||
expect { subject.record }.not_to change { observation.total_database_size_change }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
95
spec/services/ci/create_pipeline_service/include_spec.rb
Normal file
95
spec/services/ci/create_pipeline_service/include_spec.rb
Normal file
|
@ -0,0 +1,95 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe Ci::CreatePipelineService do
|
||||
context 'include:' do
|
||||
let_it_be(:project) { create(:project, :repository) }
|
||||
let_it_be(:user) { project.owner }
|
||||
|
||||
let(:ref) { 'refs/heads/master' }
|
||||
let(:source) { :push }
|
||||
let(:service) { described_class.new(project, user, { ref: ref }) }
|
||||
let(:pipeline) { service.execute(source).payload }
|
||||
|
||||
let(:file_location) { 'spec/fixtures/gitlab/ci/external_files/.gitlab-ci-template-1.yml' }
|
||||
|
||||
before do
|
||||
allow(project.repository)
|
||||
.to receive(:blob_data_at).with(project.commit.id, '.gitlab-ci.yml')
|
||||
.and_return(config)
|
||||
|
||||
allow(project.repository)
|
||||
.to receive(:blob_data_at).with(project.commit.id, file_location)
|
||||
.and_return(File.read(Rails.root.join(file_location)))
|
||||
end
|
||||
|
||||
context 'with a local file' do
|
||||
let(:config) do
|
||||
<<~EOY
|
||||
include: #{file_location}
|
||||
job:
|
||||
script: exit 0
|
||||
EOY
|
||||
end
|
||||
|
||||
it 'includes the job in the file' do
|
||||
expect(pipeline).to be_created_successfully
|
||||
expect(pipeline.processables.pluck(:name)).to contain_exactly('job', 'rspec')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with a local file with rules' do
|
||||
let(:config) do
|
||||
<<~EOY
|
||||
include:
|
||||
- local: #{file_location}
|
||||
rules:
|
||||
- if: $CI_PROJECT_ID == "#{project_id}"
|
||||
job:
|
||||
script: exit 0
|
||||
EOY
|
||||
end
|
||||
|
||||
context 'when the rules matches' do
|
||||
let(:project_id) { project.id }
|
||||
|
||||
it 'includes the job in the file' do
|
||||
expect(pipeline).to be_created_successfully
|
||||
expect(pipeline.processables.pluck(:name)).to contain_exactly('job', 'rspec')
|
||||
end
|
||||
|
||||
context 'when the FF ci_include_rules is disabled' do
|
||||
before do
|
||||
stub_feature_flags(ci_include_rules: false)
|
||||
end
|
||||
|
||||
it 'includes the job in the file' do
|
||||
expect(pipeline).to be_created_successfully
|
||||
expect(pipeline.processables.pluck(:name)).to contain_exactly('job', 'rspec')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the rules does not match' do
|
||||
let(:project_id) { non_existing_record_id }
|
||||
|
||||
it 'does not include the job in the file' do
|
||||
expect(pipeline).to be_created_successfully
|
||||
expect(pipeline.processables.pluck(:name)).to contain_exactly('job')
|
||||
end
|
||||
|
||||
context 'when the FF ci_include_rules is disabled' do
|
||||
before do
|
||||
stub_feature_flags(ci_include_rules: false)
|
||||
end
|
||||
|
||||
it 'includes the job in the file' do
|
||||
expect(pipeline).to be_created_successfully
|
||||
expect(pipeline.processables.pluck(:name)).to contain_exactly('job', 'rspec')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue