summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 18:08:11 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 18:08:11 +0000
commit8a7efa45c38ed3200d173d2c3207a8154e583c16 (patch)
tree1bb4d579b95c79aae4946a06fefa089e5549b722 /app
parent53b1f4eaa2a451aaba908a5fee7ce97a930021ac (diff)
downloadgitlab-ce-8a7efa45c38ed3200d173d2c3207a8154e583c16.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/boards/components/board.js15
-rw-r--r--app/assets/javascripts/boards/components/board_column.vue384
-rw-r--r--app/assets/javascripts/boards/index.js11
-rw-r--r--app/assets/javascripts/dropzone_input.js13
-rw-r--r--app/assets/javascripts/lib/utils/file_upload.js11
-rw-r--r--app/assets/javascripts/notes/components/diff_with_note.vue2
-rw-r--r--app/controllers/groups/boards_controller.rb1
-rw-r--r--app/controllers/projects/boards_controller.rb1
-rw-r--r--app/helpers/container_expiration_policies_helper.rb2
-rw-r--r--app/models/ci/legacy_stage.rb2
-rw-r--r--app/models/ci/pipeline.rb2
-rw-r--r--app/models/ci/stage.rb2
-rw-r--r--app/models/commit_status.rb8
-rw-r--r--app/models/concerns/has_status.rb4
-rw-r--r--app/models/user.rb2
-rw-r--r--app/services/ci/pipeline_processing/legacy_processing_service.rb4
-rw-r--r--app/views/shared/boards/_show.html.haml6
-rw-r--r--app/views/shared/boards/components/_board.html.haml3
18 files changed, 445 insertions, 28 deletions
diff --git a/app/assets/javascripts/boards/components/board.js b/app/assets/javascripts/boards/components/board.js
index b68a6ad0ef5..48f5614cefe 100644
--- a/app/assets/javascripts/boards/components/board.js
+++ b/app/assets/javascripts/boards/components/board.js
@@ -16,6 +16,14 @@ import { getBoardSortableDefaultOptions, sortableEnd } from '../mixins/sortable_
import { ListType } from '../constants';
import { isScopedLabel } from '~/lib/utils/common_utils';
+/**
+ * Please don't edit this file, have a look at:
+ * ./board_column.vue
+ * https://gitlab.com/gitlab-org/gitlab/-/issues/212300
+ *
+ * This file here will be deleted soon
+ * @deprecated
+ */
export default Vue.extend({
components: {
BoardBlankState,
@@ -54,6 +62,13 @@ export default Vue.extend({
type: String,
required: true,
},
+ // Does not do anything but is used
+ // to support the API of the new board_column.vue
+ canAdminList: {
+ type: Boolean,
+ required: false,
+ default: false,
+ },
},
data() {
return {
diff --git a/app/assets/javascripts/boards/components/board_column.vue b/app/assets/javascripts/boards/components/board_column.vue
new file mode 100644
index 00000000000..693b1f9d7b1
--- /dev/null
+++ b/app/assets/javascripts/boards/components/board_column.vue
@@ -0,0 +1,384 @@
+<script>
+import $ from 'jquery';
+import Sortable from 'sortablejs';
+import { GlButtonGroup, GlButton, GlLabel, GlTooltip, GlIcon } from '@gitlab/ui';
+import isWipLimitsOn from 'ee_else_ce/boards/mixins/is_wip_limits';
+import { s__, __, sprintf } from '~/locale';
+import Tooltip from '~/vue_shared/directives/tooltip';
+import EmptyComponent from '~/vue_shared/components/empty_component';
+import AccessorUtilities from '../../lib/utils/accessor';
+import BoardBlankState from './board_blank_state.vue';
+import BoardDelete from './board_delete';
+import BoardList from './board_list.vue';
+import IssueCount from './issue_count.vue';
+import boardsStore from '../stores/boards_store';
+import { getBoardSortableDefaultOptions, sortableEnd } from '../mixins/sortable_default_options';
+import { ListType } from '../constants';
+import { isScopedLabel } from '~/lib/utils/common_utils';
+
+export default {
+ components: {
+ BoardPromotionState: EmptyComponent,
+ BoardBlankState,
+ BoardDelete,
+ BoardList,
+ GlButtonGroup,
+ IssueCount,
+ GlButton,
+ GlLabel,
+ GlTooltip,
+ GlIcon,
+ },
+ directives: {
+ Tooltip,
+ },
+ mixins: [isWipLimitsOn],
+ props: {
+ list: {
+ type: Object,
+ default: () => ({}),
+ required: false,
+ },
+ disabled: {
+ type: Boolean,
+ required: true,
+ },
+ issueLinkBase: {
+ type: String,
+ required: true,
+ },
+ rootPath: {
+ type: String,
+ required: true,
+ },
+ boardId: {
+ type: String,
+ required: true,
+ },
+ canAdminList: {
+ type: Boolean,
+ required: false,
+ default: false,
+ },
+ groupId: {
+ type: Number,
+ required: false,
+ default: null,
+ },
+ },
+ data() {
+ return {
+ detailIssue: boardsStore.detail,
+ filter: boardsStore.filter,
+ weightFeatureAvailable: false,
+ };
+ },
+ computed: {
+ isLoggedIn() {
+ return Boolean(gon.current_user_id);
+ },
+ showListHeaderButton() {
+ return (
+ !this.disabled &&
+ this.list.type !== ListType.closed &&
+ this.list.type !== ListType.blank &&
+ this.list.type !== ListType.promotion
+ );
+ },
+ issuesTooltip() {
+ const { issuesSize } = this.list;
+
+ return sprintf(__('%{issuesSize} issues'), { issuesSize });
+ },
+ // Only needed to make karma pass.
+ weightCountToolTip() {}, // eslint-disable-line vue/return-in-computed-property
+ caretTooltip() {
+ return this.list.isExpanded ? s__('Boards|Collapse') : s__('Boards|Expand');
+ },
+ isNewIssueShown() {
+ return this.list.type === ListType.backlog || this.showListHeaderButton;
+ },
+ isSettingsShown() {
+ return (
+ this.list.type !== ListType.backlog &&
+ this.showListHeaderButton &&
+ this.list.isExpanded &&
+ this.isWipLimitsOn
+ );
+ },
+ showBoardListAndBoardInfo() {
+ return this.list.type !== ListType.blank && this.list.type !== ListType.promotion;
+ },
+ uniqueKey() {
+ // eslint-disable-next-line @gitlab/require-i18n-strings
+ return `boards.${this.boardId}.${this.list.type}.${this.list.id}`;
+ },
+ helpLink() {
+ return boardsStore.scopedLabels.helpLink;
+ },
+ },
+ watch: {
+ filter: {
+ handler() {
+ this.list.page = 1;
+ this.list.getIssues(true).catch(() => {
+ // TODO: handle request error
+ });
+ },
+ deep: true,
+ },
+ },
+ mounted() {
+ const instance = this;
+
+ const sortableOptions = getBoardSortableDefaultOptions({
+ disabled: this.disabled,
+ group: 'boards',
+ draggable: '.is-draggable',
+ handle: '.js-board-handle',
+ onEnd(e) {
+ sortableEnd();
+
+ const sortable = this;
+
+ if (e.newIndex !== undefined && e.oldIndex !== e.newIndex) {
+ const order = sortable.toArray();
+ const list = boardsStore.findList('id', parseInt(e.item.dataset.id, 10));
+
+ instance.$nextTick(() => {
+ boardsStore.moveList(list, order);
+ });
+ }
+ },
+ });
+
+ Sortable.create(this.$el.parentNode, sortableOptions);
+ },
+ created() {
+ if (
+ this.list.isExpandable &&
+ AccessorUtilities.isLocalStorageAccessSafe() &&
+ !this.isLoggedIn
+ ) {
+ const isCollapsed = localStorage.getItem(`${this.uniqueKey}.expanded`) === 'false';
+
+ this.list.isExpanded = !isCollapsed;
+ }
+ },
+ methods: {
+ showScopedLabels(label) {
+ return boardsStore.scopedLabels.enabled && isScopedLabel(label);
+ },
+
+ showNewIssueForm() {
+ this.$refs['board-list'].showIssueForm = !this.$refs['board-list'].showIssueForm;
+ },
+ toggleExpanded() {
+ if (this.list.isExpandable) {
+ this.list.isExpanded = !this.list.isExpanded;
+
+ if (AccessorUtilities.isLocalStorageAccessSafe() && !this.isLoggedIn) {
+ localStorage.setItem(`${this.uniqueKey}.expanded`, this.list.isExpanded);
+ }
+
+ if (this.isLoggedIn) {
+ this.list.update();
+ }
+
+ // When expanding/collapsing, the tooltip on the caret button sometimes stays open.
+ // Close all tooltips manually to prevent dangling tooltips.
+ $('.tooltip').tooltip('hide');
+ }
+ },
+ },
+};
+</script>
+
+<template>
+ <div
+ :class="{
+ 'is-draggable': !list.preset,
+ 'is-expandable': list.isExpandable,
+ 'is-collapsed': !list.isExpanded,
+ 'board-type-assignee': list.type === 'assignee',
+ }"
+ :data-id="list.id"
+ class="board h-100 px-2 align-top ws-normal"
+ data-qa-selector="board_list"
+ >
+ <div class="board-inner d-flex flex-column position-relative h-100 rounded">
+ <header
+ :class="{
+ 'has-border': list.label && list.label.color,
+ 'position-relative': list.isExpanded,
+ 'position-absolute position-top-0 position-left-0 w-100 h-100': !list.isExpanded,
+ }"
+ :style="{ borderTopColor: list.label && list.label.color ? list.label.color : null }"
+ class="board-header"
+ data-qa-selector="board_list_header"
+ >
+ <h3
+ :class="{
+ 'user-can-drag': !disabled && !list.preset,
+ 'border-bottom-0': !list.isExpanded,
+ }"
+ class="board-title m-0 d-flex js-board-handle"
+ >
+ <div
+ v-if="list.isExpandable"
+ v-tooltip=""
+ :aria-label="caretTooltip"
+ :title="caretTooltip"
+ aria-hidden="true"
+ class="board-title-caret no-drag"
+ data-placement="bottom"
+ @click="toggleExpanded"
+ >
+ <i
+ :class="{ 'fa-caret-right': list.isExpanded, 'fa-caret-down': !list.isExpanded }"
+ class="fa fa-fw"
+ ></i>
+ </div>
+ <!-- The following is only true in EE and if it is a milestone -->
+ <span
+ v-if="list.type === 'milestone' && list.milestone"
+ aria-hidden="true"
+ class="append-right-5 milestone-icon"
+ >
+ <gl-icon name="timer" />
+ </span>
+
+ <a
+ v-if="list.type === 'assignee'"
+ :href="list.assignee.path"
+ class="user-avatar-link js-no-trigger"
+ >
+ <img
+ :alt="list.assignee.name"
+ :src="list.assignee.avatar"
+ class="avatar s20 has-tooltip"
+ height="20"
+ width="20"
+ />
+ </a>
+ <div class="board-title-text">
+ <span
+ v-if="list.type !== 'label'"
+ :class="{
+ 'has-tooltip': !['backlog', 'closed'].includes(list.type),
+ 'd-block': list.type === 'milestone',
+ }"
+ :title="(list.label && list.label.description) || list.title || ''"
+ class="board-title-main-text block-truncated"
+ data-container="body"
+ >
+ {{ list.title }}
+ </span>
+ <span
+ v-if="list.type === 'assignee'"
+ :title="(list.assignee && list.assignee.username) || ''"
+ class="board-title-sub-text prepend-left-5 has-tooltip"
+ >
+ @{{ list.assignee.username }}
+ </span>
+ <gl-label
+ v-if="list.type === 'label'"
+ :background-color="list.label.color"
+ :description="list.label.description"
+ :scoped="showScopedLabels(list.label)"
+ :scoped-labels-documentation-link="helpLink"
+ :size="!list.isExpanded ? 'sm' : ''"
+ :title="list.label.title"
+ tooltip-placement="bottom"
+ />
+ </div>
+ <board-delete
+ v-if="canAdminList && !list.preset && list.id"
+ :list="list"
+ inline-template="true"
+ >
+ <button
+ :class="{ 'd-none': !list.isExpanded }"
+ :aria-label="__(`Delete list`)"
+ class="board-delete no-drag p-0 border-0 has-tooltip float-right"
+ data-placement="bottom"
+ title="Delete list"
+ type="button"
+ @click.stop="deleteBoard"
+ >
+ <i aria-hidden="true" data-hidden="true" class="fa fa-trash"></i>
+ </button>
+ </board-delete>
+ <div
+ v-if="showBoardListAndBoardInfo"
+ class="issue-count-badge pr-0 no-drag text-secondary"
+ >
+ <span class="d-inline-flex">
+ <gl-tooltip :target="() => $refs.issueCount" :title="issuesTooltip" />
+ <span ref="issueCount" class="issue-count-badge-count">
+ <gl-icon class="mr-1" name="issues" />
+ <issue-count :issues-size="list.issuesSize" :max-issue-count="list.maxIssueCount" />
+ </span>
+ <!-- The following is only true in EE. -->
+ <template v-if="weightFeatureAvailable">
+ <gl-tooltip :target="() => $refs.weightTooltip" :title="weightCountToolTip" />
+ <span ref="weightTooltip" class="d-inline-flex ml-2">
+ <gl-icon class="mr-1" name="weight" />
+ {{ list.totalWeight }}
+ </span>
+ </template>
+ </span>
+ </div>
+ <gl-button-group
+ v-if="isNewIssueShown || isSettingsShown"
+ class="board-list-button-group pl-2"
+ >
+ <gl-button
+ v-if="isNewIssueShown"
+ ref="newIssueBtn"
+ :class="{
+ 'd-none': !list.isExpanded,
+ 'rounded-right': isNewIssueShown && !isSettingsShown,
+ }"
+ :aria-label="__(`New issue`)"
+ class="issue-count-badge-add-button no-drag"
+ type="button"
+ @click="showNewIssueForm"
+ >
+ <i aria-hidden="true" data-hidden="true" class="fa fa-plus"></i>
+ </gl-button>
+ <gl-tooltip :target="() => $refs.newIssueBtn">{{ __('New Issue') }}</gl-tooltip>
+
+ <gl-button
+ v-if="isSettingsShown"
+ ref="settingsBtn"
+ :aria-label="__(`List settings`)"
+ class="no-drag rounded-right"
+ title="List settings"
+ type="button"
+ @click="openSidebarSettings"
+ >
+ <gl-icon name="settings" />
+ </gl-button>
+ <gl-tooltip :target="() => $refs.settingsBtn">{{ __('List settings') }}</gl-tooltip>
+ </gl-button-group>
+ </h3>
+ </header>
+ <board-list
+ v-if="showBoardListAndBoardInfo"
+ ref="board-list"
+ :disabled="disabled"
+ :group-id="groupId || null"
+ :issue-link-base="issueLinkBase"
+ :issues="list.issues"
+ :list="list"
+ :loading="list.loading"
+ :root-path="rootPath"
+ />
+ <board-blank-state v-if="canAdminList && list.id === 'blank'" />
+
+ <!-- Will be only available in EE -->
+ <board-promotion-state v-if="list.id === 'promotion'" />
+ </div>
+ </div>
+</template>
diff --git a/app/assets/javascripts/boards/index.js b/app/assets/javascripts/boards/index.js
index 781cb0c1cc9..a12db7a5f1a 100644
--- a/app/assets/javascripts/boards/index.js
+++ b/app/assets/javascripts/boards/index.js
@@ -3,7 +3,6 @@ import Vue from 'vue';
import 'ee_else_ce/boards/models/issue';
import 'ee_else_ce/boards/models/list';
-import Board from 'ee_else_ce/boards/components/board';
import BoardSidebar from 'ee_else_ce/boards/components/board_sidebar';
import initNewListDropdown from 'ee_else_ce/boards/components/new_list_dropdown';
import boardConfigToggle from 'ee_else_ce/boards/config_toggle';
@@ -65,7 +64,15 @@ export default () => {
issueBoardsApp = new Vue({
el: $boardApp,
components: {
- Board,
+ Board: () =>
+ window?.gon?.features?.sfcIssueBoards
+ ? import('ee_else_ce/boards/components/board_column.vue')
+ : /**
+ * Please have a look at, we are moving to the SFC soon:
+ * https://gitlab.com/gitlab-org/gitlab/-/issues/212300
+ * @deprecated
+ */
+ import('ee_else_ce/boards/components/board'),
BoardSidebar,
BoardAddIssuesModal,
BoardSettingsSidebar: () =>
diff --git a/app/assets/javascripts/dropzone_input.js b/app/assets/javascripts/dropzone_input.js
index 0e2dd59092a..6c158ad8990 100644
--- a/app/assets/javascripts/dropzone_input.js
+++ b/app/assets/javascripts/dropzone_input.js
@@ -6,6 +6,7 @@ import PasteMarkdownTable from './behaviors/markdown/paste_markdown_table';
import csrf from './lib/utils/csrf';
import axios from './lib/utils/axios_utils';
import { n__, __ } from '~/locale';
+import { getFilename } from '~/lib/utils/file_upload';
Dropzone.autoDiscover = false;
@@ -41,7 +42,6 @@ export default function dropzoneInput(form) {
let addFileToForm;
let updateAttachingMessage;
let isImage;
- let getFilename;
let uploadFile;
formTextarea.wrap('<div class="div-dropzone"></div>');
@@ -235,17 +235,6 @@ export default function dropzoneInput(form) {
$(form).append(`<input type="hidden" name="files[]" value="${_.escape(path)}">`);
};
- getFilename = e => {
- let value;
- if (window.clipboardData && window.clipboardData.getData) {
- value = window.clipboardData.getData('Text');
- } else if (e.clipboardData && e.clipboardData.getData) {
- value = e.clipboardData.getData('text/plain');
- }
- value = value.split('\r');
- return value[0];
- };
-
const showSpinner = () => $uploadingProgressContainer.removeClass('hide');
const closeSpinner = () => $uploadingProgressContainer.addClass('hide');
diff --git a/app/assets/javascripts/lib/utils/file_upload.js b/app/assets/javascripts/lib/utils/file_upload.js
index 82ee83e4348..b8b63bf58d4 100644
--- a/app/assets/javascripts/lib/utils/file_upload.js
+++ b/app/assets/javascripts/lib/utils/file_upload.js
@@ -14,3 +14,14 @@ export default (buttonSelector, fileSelector) => {
form.querySelector('.js-filename').textContent = fileInput.value.replace(/^.*[\\\/]/, ''); // eslint-disable-line no-useless-escape
});
};
+
+export const getFilename = ({ clipboardData }) => {
+ let value;
+ if (window.clipboardData && window.clipboardData.getData) {
+ value = window.clipboardData.getData('Text');
+ } else if (clipboardData && clipboardData.getData) {
+ value = clipboardData.getData('text/plain');
+ }
+ value = value.split('\r');
+ return value[0];
+};
diff --git a/app/assets/javascripts/notes/components/diff_with_note.vue b/app/assets/javascripts/notes/components/diff_with_note.vue
index c3915ef299b..a58a040fb4e 100644
--- a/app/assets/javascripts/notes/components/diff_with_note.vue
+++ b/app/assets/javascripts/notes/components/diff_with_note.vue
@@ -48,7 +48,7 @@ export default {
},
},
mounted() {
- if (!this.hasTruncatedDiffLines) {
+ if (this.isTextFile && !this.hasTruncatedDiffLines) {
this.fetchDiff();
}
},
diff --git a/app/controllers/groups/boards_controller.rb b/app/controllers/groups/boards_controller.rb
index fab84fb8299..a9bd24890ee 100644
--- a/app/controllers/groups/boards_controller.rb
+++ b/app/controllers/groups/boards_controller.rb
@@ -8,6 +8,7 @@ class Groups::BoardsController < Groups::ApplicationController
before_action :assign_endpoint_vars
before_action do
push_frontend_feature_flag(:multi_select_board, default_enabled: true)
+ push_frontend_feature_flag(:sfc_issue_boards, default_enabled: true)
end
private
diff --git a/app/controllers/projects/boards_controller.rb b/app/controllers/projects/boards_controller.rb
index db05da0bb7f..8fa823e0be1 100644
--- a/app/controllers/projects/boards_controller.rb
+++ b/app/controllers/projects/boards_controller.rb
@@ -9,6 +9,7 @@ class Projects::BoardsController < Projects::ApplicationController
before_action :assign_endpoint_vars
before_action do
push_frontend_feature_flag(:multi_select_board, default_enabled: true)
+ push_frontend_feature_flag(:sfc_issue_boards, default_enabled: true)
end
private
diff --git a/app/helpers/container_expiration_policies_helper.rb b/app/helpers/container_expiration_policies_helper.rb
index 5fb7b5afa6e..cc6d717ce35 100644
--- a/app/helpers/container_expiration_policies_helper.rb
+++ b/app/helpers/container_expiration_policies_helper.rb
@@ -20,7 +20,7 @@ module ContainerExpirationPoliciesHelper
def older_than_options
ContainerExpirationPolicy.older_than_options.map do |key, val|
{ key: key.to_s, label: val }.tap do |base|
- base[:default] = true if key.to_s == '30d'
+ base[:default] = true if key.to_s == '90d'
end
end
end
diff --git a/app/models/ci/legacy_stage.rb b/app/models/ci/legacy_stage.rb
index 0a67a652e22..9ca5cf13907 100644
--- a/app/models/ci/legacy_stage.rb
+++ b/app/models/ci/legacy_stage.rb
@@ -32,7 +32,7 @@ module Ci
end
def status
- @status ||= statuses.latest.slow_composite_status
+ @status ||= statuses.latest.slow_composite_status(project: project)
end
def detailed_status(current_user)
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 4e9be86d3a9..3ce44a066ae 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -968,7 +968,7 @@ module Ci
def latest_builds_status
return 'failed' unless yaml_errors.blank?
- statuses.latest.slow_composite_status || 'skipped'
+ statuses.latest.slow_composite_status(project: project) || 'skipped'
end
def keep_around_commits
diff --git a/app/models/ci/stage.rb b/app/models/ci/stage.rb
index 75f73429c2a..e6c34f3df03 100644
--- a/app/models/ci/stage.rb
+++ b/app/models/ci/stage.rb
@@ -138,7 +138,7 @@ module Ci
end
def latest_stage_status
- statuses.latest.slow_composite_status || 'skipped'
+ statuses.latest.slow_composite_status(project: project) || 'skipped'
end
end
end
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index 03260b28335..046f131b041 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -178,12 +178,12 @@ class CommitStatus < ApplicationRecord
select(:name)
end
- def self.status_for_prior_stages(index)
- before_stage(index).latest.slow_composite_status || 'success'
+ def self.status_for_prior_stages(index, project:)
+ before_stage(index).latest.slow_composite_status(project: project) || 'success'
end
- def self.status_for_names(names)
- where(name: names).latest.slow_composite_status || 'success'
+ def self.status_for_names(names, project:)
+ where(name: names).latest.slow_composite_status(project: project) || 'success'
end
def self.update_as_processed!
diff --git a/app/models/concerns/has_status.rb b/app/models/concerns/has_status.rb
index e06dad38c32..b80f8c2bbb2 100644
--- a/app/models/concerns/has_status.rb
+++ b/app/models/concerns/has_status.rb
@@ -65,8 +65,8 @@ module HasStatus
# This method performs expensive calculation of status:
# 1. By plucking all related objects,
# 2. Or executes expensive SQL query
- def slow_composite_status
- if Feature.enabled?(:ci_composite_status, default_enabled: false)
+ def slow_composite_status(project:)
+ if Feature.enabled?(:ci_composite_status, project, default_enabled: false)
Gitlab::Ci::Status::Composite
.new(all, with_allow_failure: columns_hash.key?('allow_failure'))
.status
diff --git a/app/models/user.rb b/app/models/user.rb
index e18d642a155..4d450f9305f 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1689,7 +1689,7 @@ class User < ApplicationRecord
def gitlab_employee?
strong_memoize(:gitlab_employee) do
if Gitlab.com?
- Mail::Address.new(email).domain == "gitlab.com"
+ Mail::Address.new(email).domain == "gitlab.com" && confirmed?
else
false
end
diff --git a/app/services/ci/pipeline_processing/legacy_processing_service.rb b/app/services/ci/pipeline_processing/legacy_processing_service.rb
index 278fba20283..8d7b80282fc 100644
--- a/app/services/ci/pipeline_processing/legacy_processing_service.rb
+++ b/app/services/ci/pipeline_processing/legacy_processing_service.rb
@@ -89,11 +89,11 @@ module Ci
end
def status_for_prior_stages(index)
- pipeline.processables.status_for_prior_stages(index)
+ pipeline.processables.status_for_prior_stages(index, project: pipeline.project)
end
def status_for_build_needs(needs)
- pipeline.processables.status_for_names(needs)
+ pipeline.processables.status_for_names(needs, project: pipeline.project)
end
# rubocop: disable CodeReuse/ActiveRecord
diff --git a/app/views/shared/boards/_show.html.haml b/app/views/shared/boards/_show.html.haml
index 7f62b983bfc..cf42ac3dd37 100644
--- a/app/views/shared/boards/_show.html.haml
+++ b/app/views/shared/boards/_show.html.haml
@@ -1,5 +1,9 @@
- board = local_assigns.fetch(:board, nil)
- group = local_assigns.fetch(:group, false)
+-# TODO: Move group_id and can_admin_list to the board store
+ See: https://gitlab.com/gitlab-org/gitlab/-/issues/213082
+- group_id = @group&.id || "null"
+- can_admin_list = can?(current_user, :admin_list, current_board_parent) == true
- @no_breadcrumb_container = true
- @no_container = true
- @content_class = "issue-boards-content js-focus-mode-board"
@@ -22,6 +26,8 @@
%board{ "v-cloak" => "true",
"v-for" => "list in state.lists",
"ref" => "board",
+ ":can-admin-list" => can_admin_list,
+ ":group-id" => group_id,
":list" => "list",
":disabled" => "disabled",
":issue-link-base" => "issueLinkBase",
diff --git a/app/views/shared/boards/components/_board.html.haml b/app/views/shared/boards/components/_board.html.haml
index e42d8650708..f3f2c09ea61 100644
--- a/app/views/shared/boards/components/_board.html.haml
+++ b/app/views/shared/boards/components/_board.html.haml
@@ -1,3 +1,6 @@
+-# Please have a look at app/assets/javascripts/boards/components/board_column.vue
+ This haml file is deprecated and will be deleted soon, please change the Vue app
+ https://gitlab.com/gitlab-org/gitlab/-/issues/212300
.board.h-100.px-2.align-top.ws-normal{ ":class" => '{ "is-draggable": !list.preset, "is-expandable": list.isExpandable, "is-collapsed": !list.isExpanded, "board-type-assignee": list.type === "assignee" }',
":data-id" => "list.id", data: { qa_selector: "board_list" } }
.board-inner.d-flex.flex-column.position-relative.h-100.rounded