diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-12 00:10:27 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-12 00:10:27 +0000 |
commit | a160c4b1a72105a751cdc2f9f973dbe39a1c0dfd (patch) | |
tree | 8383dcf5249407b3301289415ed9c3daccd43057 /app | |
parent | 0ae8428c8e77d5d7e098827be688b1f146321af1 (diff) | |
download | gitlab-ce-a160c4b1a72105a751cdc2f9f973dbe39a1c0dfd.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
23 files changed, 33 insertions, 25 deletions
diff --git a/app/assets/javascripts/boards/components/board_content_sidebar.vue b/app/assets/javascripts/boards/components/board_content_sidebar.vue index 7ce9492f79b..e1f8457c0e2 100644 --- a/app/assets/javascripts/boards/components/board_content_sidebar.vue +++ b/app/assets/javascripts/boards/components/board_content_sidebar.vue @@ -32,6 +32,9 @@ export default { import('ee_component/sidebar/components/sidebar_iteration_widget.vue'), }, inject: { + multipleAssigneesFeatureAvailable: { + default: false, + }, epicFeatureAvailable: { default: false, }, @@ -83,7 +86,7 @@ export default { :iid="activeBoardItem.iid" :full-path="fullPath" :initial-assignees="activeBoardItem.assignees" - class="assignee" + :allow-multiple-assignees="multipleAssigneesFeatureAvailable" @assignees-updated="setAssignees" /> <board-sidebar-epic-select v-if="epicFeatureAvailable" class="epic" /> diff --git a/app/assets/javascripts/boards/index.js b/app/assets/javascripts/boards/index.js index 97006cea3f1..53825d2c045 100644 --- a/app/assets/javascripts/boards/index.js +++ b/app/assets/javascripts/boards/index.js @@ -101,6 +101,9 @@ export default () => { labelsManagePath: $boardApp.dataset.labelsManagePath, labelsFilterBasePath: $boardApp.dataset.labelsFilterBasePath, timeTrackingLimitToHours: parseBoolean($boardApp.dataset.timeTrackingLimitToHours), + multipleAssigneesFeatureAvailable: parseBoolean( + $boardApp.dataset.multipleAssigneesFeatureAvailable, + ), epicFeatureAvailable: parseBoolean($boardApp.dataset.epicFeatureAvailable), iterationFeatureAvailable: parseBoolean($boardApp.dataset.iterationFeatureAvailable), weightFeatureAvailable: parseBoolean($boardApp.dataset.weightFeatureAvailable), diff --git a/app/assets/javascripts/releases/components/app_show.vue b/app/assets/javascripts/releases/components/app_show.vue index c38e93d420b..fdb0f99b735 100644 --- a/app/assets/javascripts/releases/components/app_show.vue +++ b/app/assets/javascripts/releases/components/app_show.vue @@ -1,7 +1,7 @@ <script> import createFlash from '~/flash'; import { s__ } from '~/locale'; -import oneReleaseQuery from '../queries/one_release.query.graphql'; +import oneReleaseQuery from '../graphql/queries/one_release.query.graphql'; import { convertGraphQLRelease } from '../util'; import ReleaseBlock from './release_block.vue'; import ReleaseSkeletonLoader from './release_skeleton_loader.vue'; diff --git a/app/assets/javascripts/releases/queries/release.fragment.graphql b/app/assets/javascripts/releases/graphql/fragments/release.fragment.graphql index 3a742db7d9e..3a742db7d9e 100644 --- a/app/assets/javascripts/releases/queries/release.fragment.graphql +++ b/app/assets/javascripts/releases/graphql/fragments/release.fragment.graphql diff --git a/app/assets/javascripts/releases/queries/release_for_editing.fragment.graphql b/app/assets/javascripts/releases/graphql/fragments/release_for_editing.fragment.graphql index 47c5afefd78..47c5afefd78 100644 --- a/app/assets/javascripts/releases/queries/release_for_editing.fragment.graphql +++ b/app/assets/javascripts/releases/graphql/fragments/release_for_editing.fragment.graphql diff --git a/app/assets/javascripts/releases/queries/create_release.mutation.graphql b/app/assets/javascripts/releases/graphql/mutations/create_release.mutation.graphql index 56bfe7c23d6..56bfe7c23d6 100644 --- a/app/assets/javascripts/releases/queries/create_release.mutation.graphql +++ b/app/assets/javascripts/releases/graphql/mutations/create_release.mutation.graphql diff --git a/app/assets/javascripts/releases/queries/create_release_link.mutation.graphql b/app/assets/javascripts/releases/graphql/mutations/create_release_link.mutation.graphql index 4bdfc79dbc4..4bdfc79dbc4 100644 --- a/app/assets/javascripts/releases/queries/create_release_link.mutation.graphql +++ b/app/assets/javascripts/releases/graphql/mutations/create_release_link.mutation.graphql diff --git a/app/assets/javascripts/releases/queries/delete_release_link.mutation.graphql b/app/assets/javascripts/releases/graphql/mutations/delete_release_link.mutation.graphql index a75eddcd288..a75eddcd288 100644 --- a/app/assets/javascripts/releases/queries/delete_release_link.mutation.graphql +++ b/app/assets/javascripts/releases/graphql/mutations/delete_release_link.mutation.graphql diff --git a/app/assets/javascripts/releases/queries/update_release.mutation.graphql b/app/assets/javascripts/releases/graphql/mutations/update_release.mutation.graphql index 9c6a861d2f1..9c6a861d2f1 100644 --- a/app/assets/javascripts/releases/queries/update_release.mutation.graphql +++ b/app/assets/javascripts/releases/graphql/mutations/update_release.mutation.graphql diff --git a/app/assets/javascripts/releases/queries/all_releases.query.graphql b/app/assets/javascripts/releases/graphql/queries/all_releases.query.graphql index a07dabb9fd6..10e4d883e62 100644 --- a/app/assets/javascripts/releases/queries/all_releases.query.graphql +++ b/app/assets/javascripts/releases/graphql/queries/all_releases.query.graphql @@ -1,4 +1,4 @@ -#import "./release.fragment.graphql" +#import "../fragments/release.fragment.graphql" query allReleases( $fullPath: ID! diff --git a/app/assets/javascripts/releases/queries/one_release.query.graphql b/app/assets/javascripts/releases/graphql/queries/one_release.query.graphql index b893aea94b0..c80d6e753ab 100644 --- a/app/assets/javascripts/releases/queries/one_release.query.graphql +++ b/app/assets/javascripts/releases/graphql/queries/one_release.query.graphql @@ -1,4 +1,4 @@ -#import "./release.fragment.graphql" +#import "../fragments/release.fragment.graphql" query oneRelease($fullPath: ID!, $tagName: String!) { project(fullPath: $fullPath) { diff --git a/app/assets/javascripts/releases/queries/one_release_for_editing.query.graphql b/app/assets/javascripts/releases/graphql/queries/one_release_for_editing.query.graphql index 55075c21053..767ba4aeca0 100644 --- a/app/assets/javascripts/releases/queries/one_release_for_editing.query.graphql +++ b/app/assets/javascripts/releases/graphql/queries/one_release_for_editing.query.graphql @@ -1,4 +1,4 @@ -#import "./release_for_editing.fragment.graphql" +#import "../fragments/release_for_editing.fragment.graphql" query oneReleaseForEditing($fullPath: ID!, $tagName: String!) { project(fullPath: $fullPath) { diff --git a/app/assets/javascripts/releases/stores/modules/edit_new/actions.js b/app/assets/javascripts/releases/stores/modules/edit_new/actions.js index 2c41ddb3e33..b312c2a7506 100644 --- a/app/assets/javascripts/releases/stores/modules/edit_new/actions.js +++ b/app/assets/javascripts/releases/stores/modules/edit_new/actions.js @@ -1,11 +1,11 @@ import { deprecatedCreateFlash as createFlash } from '~/flash'; import { redirectTo } from '~/lib/utils/url_utility'; import { s__ } from '~/locale'; -import createReleaseMutation from '~/releases/queries/create_release.mutation.graphql'; -import createReleaseAssetLinkMutation from '~/releases/queries/create_release_link.mutation.graphql'; -import deleteReleaseAssetLinkMutation from '~/releases/queries/delete_release_link.mutation.graphql'; -import oneReleaseForEditingQuery from '~/releases/queries/one_release_for_editing.query.graphql'; -import updateReleaseMutation from '~/releases/queries/update_release.mutation.graphql'; +import createReleaseMutation from '~/releases/graphql/mutations/create_release.mutation.graphql'; +import createReleaseAssetLinkMutation from '~/releases/graphql/mutations/create_release_link.mutation.graphql'; +import deleteReleaseAssetLinkMutation from '~/releases/graphql/mutations/delete_release_link.mutation.graphql'; +import updateReleaseMutation from '~/releases/graphql/mutations/update_release.mutation.graphql'; +import oneReleaseForEditingQuery from '~/releases/graphql/queries/one_release_for_editing.query.graphql'; import { gqClient, convertOneReleaseGraphQLResponse } from '~/releases/util'; import * as types from './mutation_types'; diff --git a/app/assets/javascripts/releases/stores/modules/index/actions.js b/app/assets/javascripts/releases/stores/modules/index/actions.js index 8496cceffe6..35996126658 100644 --- a/app/assets/javascripts/releases/stores/modules/index/actions.js +++ b/app/assets/javascripts/releases/stores/modules/index/actions.js @@ -1,7 +1,7 @@ import { deprecatedCreateFlash as createFlash } from '~/flash'; import { __ } from '~/locale'; import { PAGE_SIZE } from '~/releases/constants'; -import allReleasesQuery from '~/releases/queries/all_releases.query.graphql'; +import allReleasesQuery from '~/releases/graphql/queries/all_releases.query.graphql'; import { gqClient, convertAllReleasesGraphQLResponse } from '~/releases/util'; import * as types from './mutation_types'; diff --git a/app/assets/javascripts/sidebar/components/assignees/issuable_assignees.vue b/app/assets/javascripts/sidebar/components/assignees/issuable_assignees.vue index e93aced12f3..80caebad39d 100644 --- a/app/assets/javascripts/sidebar/components/assignees/issuable_assignees.vue +++ b/app/assets/javascripts/sidebar/components/assignees/issuable_assignees.vue @@ -60,7 +60,7 @@ export default { v-else :users="users" :issuable-type="issuableType" - class="gl-mt-2 hide-collapsed" + class="gl-text-gray-800 gl-mt-2 hide-collapsed" /> </div> </template> diff --git a/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue b/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue index aba63f89539..932be7addc0 100644 --- a/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue +++ b/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue @@ -71,8 +71,7 @@ export default { }, allowMultipleAssignees: { type: Boolean, - required: false, - default: true, + required: true, }, }, data() { diff --git a/app/finders/ci/pipelines_for_merge_request_finder.rb b/app/finders/ci/pipelines_for_merge_request_finder.rb index 1f6ee9d75ad..be65b1f6b3c 100644 --- a/app/finders/ci/pipelines_for_merge_request_finder.rb +++ b/app/finders/ci/pipelines_for_merge_request_finder.rb @@ -45,8 +45,12 @@ module Ci private + # rubocop: disable CodeReuse/ActiveRecord def pipelines_using_cte - cte = Gitlab::SQL::CTE.new(:shas, merge_request.all_commits.select(:sha)) + sha_relation = merge_request.all_commits.select(:sha) + sha_relation = sha_relation.distinct if Feature.enabled?(:use_distinct_in_shas_cte) + + cte = Gitlab::SQL::CTE.new(:shas, sha_relation) pipelines_for_merge_requests = triggered_by_merge_request pipelines_for_branch = filter_by_sha(triggered_for_branch, cte) @@ -54,6 +58,7 @@ module Ci Ci::Pipeline.with(cte.to_arel) # rubocop: disable CodeReuse/ActiveRecord .from_union([pipelines_for_merge_requests, pipelines_for_branch]) end + # rubocop: enable CodeReuse/ActiveRecord def filter_by_sha(pipelines, cte) hex = Arel::Nodes::SqlLiteral.new("'hex'") diff --git a/app/graphql/types/ci/job_type.rb b/app/graphql/types/ci/job_type.rb index 21df25865d4..5ed4d823aee 100644 --- a/app/graphql/types/ci/job_type.rb +++ b/app/graphql/types/ci/job_type.rb @@ -71,6 +71,8 @@ module Types description: 'Indicates the job can be canceled.' field :active, GraphQL::BOOLEAN_TYPE, null: false, method: :active?, description: 'Indicates the job is active.' + field :stuck, GraphQL::BOOLEAN_TYPE, null: false, method: :stuck?, + description: 'Indicates the job is stuck.' field :coverage, GraphQL::FLOAT_TYPE, null: true, description: 'Coverage level of the job.' field :created_by_tag, GraphQL::BOOLEAN_TYPE, null: false, diff --git a/app/models/alert_management/alert.rb b/app/models/alert_management/alert.rb index 4082cb3ca86..156111ffaf3 100644 --- a/app/models/alert_management/alert.rb +++ b/app/models/alert_management/alert.rb @@ -20,7 +20,6 @@ module AlertManagement resolved: 2, ignored: 3 }.freeze - private_constant :STATUSES STATUS_DESCRIPTIONS = { triggered: 'Investigation has not started', diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 1706c4883a4..54d5efbbdbc 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -70,7 +70,9 @@ module Ci has_many :deployments, through: :builds has_many :environments, -> { distinct }, through: :deployments has_many :latest_builds, -> { latest.with_project_and_metadata }, foreign_key: :commit_id, inverse_of: :pipeline, class_name: 'Ci::Build' - has_many :downloadable_artifacts, -> { not_expired.downloadable.with_job }, through: :latest_builds, source: :job_artifacts + has_many :downloadable_artifacts, -> do + not_expired.or(where_exists(::Ci::Pipeline.artifacts_locked.where('ci_pipelines.id = ci_builds.commit_id'))).downloadable.with_job + end, through: :latest_builds, source: :job_artifacts has_many :messages, class_name: 'Ci::PipelineMessage', inverse_of: :pipeline diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb index a3c4f3573d6..2dc6796732f 100644 --- a/app/models/merge_request_diff.rb +++ b/app/models/merge_request_diff.rb @@ -754,7 +754,6 @@ class MergeRequestDiff < ApplicationRecord end def reorder_diff_files! - return unless sort_diffs? return if sorted? || merge_request_diff_files.empty? diff_files = sort_diffs(merge_request_diff_files) @@ -773,14 +772,8 @@ class MergeRequestDiff < ApplicationRecord end def sort_diffs(diffs) - return diffs unless sort_diffs? - Gitlab::Diff::FileCollectionSorter.new(diffs).sort end - - def sort_diffs? - Feature.enabled?(:sort_diffs, project, default_enabled: :yaml) - end end MergeRequestDiff.prepend_mod_with('MergeRequestDiff') diff --git a/app/models/users/credit_card_validation.rb b/app/models/users/credit_card_validation.rb index 2ccebc65552..5e255acd882 100644 --- a/app/models/users/credit_card_validation.rb +++ b/app/models/users/credit_card_validation.rb @@ -2,6 +2,8 @@ module Users class CreditCardValidation < ApplicationRecord + RELEASE_DAY = Date.new(2021, 5, 17) + self.table_name = 'user_credit_card_validations' belongs_to :user diff --git a/app/views/shared/boards/components/sidebar/_assignee.html.haml b/app/views/shared/boards/components/sidebar/_assignee.html.haml index 8da8d567098..79817025565 100644 --- a/app/views/shared/boards/components/sidebar/_assignee.html.haml +++ b/app/views/shared/boards/components/sidebar/_assignee.html.haml @@ -6,5 +6,5 @@ %sidebar-assignees-widget{ ":iid" => "String(issue.iid)", ":full-path" => "issue.path.split('/-/')[0].substring(1).replace(`#{relative_url}`, '')", ":initial-assignees" => "issue.assignees", - ":multiple-assignees" => "!Boolean(#{dropdown_options[:data][:"max-select"]})", + ":allow-multiple-assignees" => "!Boolean(#{dropdown_options[:data][:"max-select"]})", "@assignees-updated" => "setAssignees" } |