summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-26 18:09:18 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-26 18:09:18 +0000
commit08931747cc2092734a794980ef13ff67e89a9d8b (patch)
tree0ef1c5fd1e60201b52954c1c105b800930d92c90
parent2eaa60e4555bb11ad5c0af905217f0fa61cf7cc9 (diff)
downloadgitlab-ce-08931747cc2092734a794980ef13ff67e89a9d8b.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.gitlab/ci/rails.gitlab-ci.yml4
-rw-r--r--app/assets/javascripts/boards/components/board_content.vue12
-rw-r--r--app/assets/javascripts/boards/components/board_list_header_new.vue2
-rw-r--r--app/assets/javascripts/boards/components/modal/filters.js3
-rw-r--r--app/assets/javascripts/boards/filtered_search_boards.js10
-rw-r--r--app/assets/javascripts/boards/index.js17
-rw-r--r--app/assets/javascripts/boards/stores/boards_store.js6
-rw-r--r--app/assets/javascripts/boards/stores/getters.js8
-rw-r--r--app/controllers/groups/boards_controller.rb1
-rw-r--r--app/controllers/projects/boards_controller.rb3
-rw-r--r--app/helpers/defer_script_tag_helper.rb10
-rw-r--r--app/helpers/gitlab_script_tag_helper.rb24
-rw-r--r--app/views/layouts/_google_analytics.html.haml2
-rw-r--r--app/views/layouts/_google_tag_manager_head.html.haml2
-rw-r--r--app/views/layouts/_img_loader.html.haml2
-rw-r--r--app/views/layouts/_init_auto_complete.html.haml2
-rw-r--r--app/views/layouts/_init_client_detection_flags.html.haml2
-rw-r--r--app/views/layouts/_matomo.html.haml2
-rw-r--r--app/views/layouts/_snowplow.html.haml2
-rw-r--r--app/views/layouts/_startup_css_activation.haml2
-rw-r--r--app/views/layouts/_startup_js.html.haml2
-rw-r--r--app/views/layouts/errors.html.haml2
-rw-r--r--app/views/layouts/group.html.haml2
-rw-r--r--app/views/layouts/project.html.haml2
-rw-r--r--app/views/layouts/snippets.html.haml2
-rw-r--r--app/views/projects/ci/builds/_build.html.haml2
-rw-r--r--app/views/projects/merge_requests/_widget.html.haml2
-rw-r--r--app/views/shared/boards/_show.html.haml23
-rw-r--r--app/views/shared/issuable/_search_bar.html.haml2
-rw-r--r--changelogs/unreleased/fix-misaligned-job-buttons-24395.yml5
-rw-r--r--config/feature_flags/development/boards_with_swimlanes.yml8
-rw-r--r--config/initializers/1_settings.rb4
-rw-r--r--doc/.vale/gitlab/Acronyms.yml2
-rw-r--r--doc/administration/img/audit_log_v13_6.pngbin72215 -> 43867 bytes
-rw-r--r--doc/ci/quick_start/img/job_details_v13_6.pngbin127827 -> 37598 bytes
-rw-r--r--doc/ci/quick_start/img/pipeline_graph_v13_6.pngbin27157 -> 8789 bytes
-rw-r--r--doc/ci/quick_start/img/three_stages_v13_6.pngbin23531 -> 7946 bytes
-rw-r--r--doc/development/img/bulk_imports_overview_v13_7.pngbin106650 -> 35495 bytes
-rw-r--r--doc/integration/img/sourcegraph_admin_v12_5.pngbin46861 -> 18222 bytes
-rw-r--r--doc/user/group/img/group_code_coverage_analytics_v13_7.pngbin64474 -> 21846 bytes
-rw-r--r--doc/user/packages/index.md4
-rw-r--r--doc/user/packages/pypi_repository/index.md4
-rw-r--r--doc/user/project/img/service_desk_issue_tracker.pngbin45671 -> 26096 bytes
-rw-r--r--lib/gitlab/ci/templates/npm.gitlab-ci.yml2
-rw-r--r--lib/gitlab/usage_data_counters/known_events/package_events.yml66
-rw-r--r--lib/tasks/gitlab/packages/events.rake3
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_merge_ref_diff_spec.rb2
-rwxr-xr-xscripts/lint-doc.sh12
-rwxr-xr-xscripts/used-feature-flags2
-rw-r--r--spec/frontend/boards/list_spec.js1
-rw-r--r--spec/frontend/boards/stores/getters_spec.js48
-rw-r--r--spec/helpers/defer_script_tag_helper_spec.rb14
-rw-r--r--spec/helpers/gitlab_script_tag_helper_spec.rb44
-rw-r--r--spec/services/projects/update_pages_service_spec.rb10
54 files changed, 217 insertions, 169 deletions
diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml
index 3962be8d84d..ba6c959d3ae 100644
--- a/.gitlab/ci/rails.gitlab-ci.yml
+++ b/.gitlab/ci/rails.gitlab-ci.yml
@@ -384,6 +384,7 @@ rspec:feature-flags:
- .coverage-base
- .rails:rules:rspec-feature-flags
stage: post-test
+ allow_failure: true
# We cannot use needs since it would mean needing 84 jobs (since most are parallelized)
# so we use `dependencies` here.
dependencies:
@@ -403,7 +404,8 @@ rspec:feature-flags:
- memory-on-boot
script:
- run_timed_command "bundle install --jobs=$(nproc) --path=vendor --retry=3 --quiet --without default development test production puma unicorn kerberos metrics omnibus ed25519"
- - run_timed_command "bundle exec scripts/used-feature-flags"
+ - 'run_timed_command "bundle exec scripts/used-feature-flags" || (scripts/slack master-broken "☠️ \`${CI_JOB_NAME}\` failed! ☠️ See ${CI_JOB_URL}" ci_failing "GitLab Bot" && exit 1)'
+
# EE/FOSS: default refs (MRs, master, schedules) jobs #
#######################################################
diff --git a/app/assets/javascripts/boards/components/board_content.vue b/app/assets/javascripts/boards/components/board_content.vue
index 92976574efb..54ce736e26b 100644
--- a/app/assets/javascripts/boards/components/board_content.vue
+++ b/app/assets/javascripts/boards/components/board_content.vue
@@ -32,9 +32,9 @@ export default {
...mapState(['boardLists', 'error']),
...mapGetters(['isSwimlanesOn']),
boardListsToUse() {
- const lists =
- this.glFeatures.graphqlBoardLists || this.isSwimlanesOn ? this.boardLists : this.lists;
- return sortBy([...Object.values(lists)], 'position');
+ return this.glFeatures.graphqlBoardLists || this.isSwimlanesOn
+ ? sortBy([...Object.values(this.boardLists)], 'position')
+ : this.lists;
},
},
mounted() {
@@ -53,11 +53,7 @@ export default {
<gl-alert v-if="error" variant="danger" :dismissible="false">
{{ error }}
</gl-alert>
- <div
- v-if="!isSwimlanesOn"
- class="boards-list gl-w-full gl-py-5 gl-px-3 gl-white-space-nowrap"
- data-qa-selector="boards_list"
- >
+ <div v-if="!isSwimlanesOn" class="boards-list gl-w-full gl-py-5 gl-px-3 gl-white-space-nowrap">
<board-column
v-for="list in boardListsToUse"
:key="list.id"
diff --git a/app/assets/javascripts/boards/components/board_list_header_new.vue b/app/assets/javascripts/boards/components/board_list_header_new.vue
index 447fef4b49c..d74b5115214 100644
--- a/app/assets/javascripts/boards/components/board_list_header_new.vue
+++ b/app/assets/javascripts/boards/components/board_list_header_new.vue
@@ -278,7 +278,7 @@ export default {
v-if="isSwimlanesHeader && !list.isExpanded"
ref="collapsedInfo"
aria-hidden="true"
- class="board-header-collapsed-info-icon gl-mt-2 gl-cursor-pointer gl-text-gray-500"
+ class="board-header-collapsed-info-icon gl-cursor-pointer gl-text-gray-500"
>
<gl-icon name="information" />
</span>
diff --git a/app/assets/javascripts/boards/components/modal/filters.js b/app/assets/javascripts/boards/components/modal/filters.js
index 56a0fde5a91..41f09a1895f 100644
--- a/app/assets/javascripts/boards/components/modal/filters.js
+++ b/app/assets/javascripts/boards/components/modal/filters.js
@@ -1,5 +1,6 @@
import FilteredSearchBoards from '../../filtered_search_boards';
import FilteredSearchContainer from '../../../filtered_search/container';
+import vuexstore from '~/boards/stores';
export default {
name: 'modal-filters',
@@ -12,7 +13,7 @@ export default {
mounted() {
FilteredSearchContainer.container = this.$el;
- this.filteredSearch = new FilteredSearchBoards(this.store);
+ this.filteredSearch = new FilteredSearchBoards(this.store, vuexstore);
this.filteredSearch.setup();
this.filteredSearch.removeTokens();
this.filteredSearch.handleInputPlaceholder();
diff --git a/app/assets/javascripts/boards/filtered_search_boards.js b/app/assets/javascripts/boards/filtered_search_boards.js
index 4fa78ecd5a4..9e857bbfad2 100644
--- a/app/assets/javascripts/boards/filtered_search_boards.js
+++ b/app/assets/javascripts/boards/filtered_search_boards.js
@@ -4,7 +4,7 @@ import FilteredSearchContainer from '../filtered_search/container';
import boardsStore from './stores/boards_store';
export default class FilteredSearchBoards extends FilteredSearchManager {
- constructor(store, updateUrl = false, cantEdit = []) {
+ constructor(store, vuexstore, updateUrl = false, cantEdit = []) {
super({
page: 'boards',
isGroupDecendent: true,
@@ -22,18 +22,18 @@ export default class FilteredSearchBoards extends FilteredSearchManager {
this.isHandledAsync = true;
this.cantEdit = cantEdit.filter(i => typeof i === 'string');
this.cantEditWithValue = cantEdit.filter(i => typeof i === 'object');
+
+ this.vuexstore = vuexstore;
}
updateObject(path) {
const groupByParam = new URLSearchParams(window.location.search).get('group_by');
this.store.path = `${path.substr(1)}${groupByParam ? `&group_by=${groupByParam}` : ''}`;
- if (gon.features.boardsWithSwimlanes || gon.features.graphqlBoardLists) {
+ if (this.vuexstore.getters.shouldUseGraphQL) {
boardsStore.updateFiltersUrl();
boardsStore.performSearch();
- }
-
- if (this.updateUrl) {
+ } else if (this.updateUrl) {
boardsStore.updateFiltersUrl();
}
}
diff --git a/app/assets/javascripts/boards/index.js b/app/assets/javascripts/boards/index.js
index d3e40299d8d..bda581f5a4d 100644
--- a/app/assets/javascripts/boards/index.js
+++ b/app/assets/javascripts/boards/index.js
@@ -1,5 +1,5 @@
import Vue from 'vue';
-import { mapActions, mapGetters, mapState } from 'vuex';
+import { mapActions, mapGetters } from 'vuex';
import 'ee_else_ce/boards/models/issue';
import 'ee_else_ce/boards/models/list';
@@ -77,7 +77,6 @@ export default () => {
el: $boardApp,
components: {
BoardContent,
- Board: () => import('ee_else_ce/boards/components/board_column.vue'),
BoardSidebar,
BoardAddIssuesModal,
BoardSettingsSidebar: () => import('~/boards/components/board_settings_sidebar.vue'),
@@ -114,8 +113,7 @@ export default () => {
};
},
computed: {
- ...mapState(['isShowingEpicsSwimlanes']),
- ...mapGetters(['shouldUseGraphQL']),
+ ...mapGetters(['isSwimlanesOn', 'shouldUseGraphQL']),
detailIssueVisible() {
return Object.keys(this.detailIssue.issue).length;
},
@@ -154,7 +152,12 @@ export default () => {
eventHub.$off('initialBoardLoad', this.initialBoardLoad);
},
mounted() {
- this.filterManager = new FilteredSearchBoards(boardsStore.filter, true, boardsStore.cantEdit);
+ this.filterManager = new FilteredSearchBoards(
+ boardsStore.filter,
+ store,
+ true,
+ boardsStore.cantEdit,
+ );
this.filterManager.setup();
this.performSearch();
@@ -193,11 +196,11 @@ export default () => {
},
performSearch() {
this.setFilters(convertObjectPropsToCamelCase(urlParamsToObject(window.location.search)));
- if (gon.features.boardsWithSwimlanes && this.isShowingEpicsSwimlanes) {
+ if (this.isSwimlanesOn) {
this.resetEpics();
this.resetIssues();
this.fetchEpicsSwimlanes({});
- } else if (gon.features.graphqlBoardLists && !this.isShowingEpicsSwimlanes) {
+ } else if (gon.features.graphqlBoardLists) {
this.fetchLists();
this.resetIssues();
}
diff --git a/app/assets/javascripts/boards/stores/boards_store.js b/app/assets/javascripts/boards/stores/boards_store.js
index 337b2897fe9..2a4bf7c7288 100644
--- a/app/assets/javascripts/boards/stores/boards_store.js
+++ b/app/assets/javascripts/boards/stores/boards_store.js
@@ -302,11 +302,7 @@ const boardsStore = {
onNewListIssueResponse(list, issue, data) {
issue.refreshData(data);
- if (
- !gon.features.boardsWithSwimlanes &&
- !gon.features.graphqlBoardLists &&
- list.issues.length > 1
- ) {
+ if (list.issues.length > 1) {
const moveBeforeId = list.issues[1].id;
this.moveIssue(issue.id, null, null, null, moveBeforeId);
}
diff --git a/app/assets/javascripts/boards/stores/getters.js b/app/assets/javascripts/boards/stores/getters.js
index cd28b4a0ff7..d2517fd2cfc 100644
--- a/app/assets/javascripts/boards/stores/getters.js
+++ b/app/assets/javascripts/boards/stores/getters.js
@@ -4,13 +4,7 @@ import { inactiveId } from '../constants';
export default {
labelToggleState: state => (state.isShowingLabels ? 'on' : 'off'),
isSidebarOpen: state => state.activeId !== inactiveId,
- isSwimlanesOn: state => {
- if (!gon?.features?.boardsWithSwimlanes && !gon?.features?.swimlanes) {
- return false;
- }
-
- return state.isShowingEpicsSwimlanes;
- },
+ isSwimlanesOn: () => false,
getIssueById: state => id => {
return state.issues[id] || {};
},
diff --git a/app/controllers/groups/boards_controller.rb b/app/controllers/groups/boards_controller.rb
index c2d72610c66..093cdf258b2 100644
--- a/app/controllers/groups/boards_controller.rb
+++ b/app/controllers/groups/boards_controller.rb
@@ -8,7 +8,6 @@ class Groups::BoardsController < Groups::ApplicationController
before_action :assign_endpoint_vars
before_action do
push_frontend_feature_flag(:graphql_board_lists, group, default_enabled: false)
- push_frontend_feature_flag(:boards_with_swimlanes, group, default_enabled: true)
end
feature_category :boards
diff --git a/app/controllers/projects/boards_controller.rb b/app/controllers/projects/boards_controller.rb
index fe4502a0e06..0d92127910d 100644
--- a/app/controllers/projects/boards_controller.rb
+++ b/app/controllers/projects/boards_controller.rb
@@ -7,9 +7,6 @@ class Projects::BoardsController < Projects::ApplicationController
before_action :check_issues_available!
before_action :authorize_read_board!, only: [:index, :show]
before_action :assign_endpoint_vars
- before_action do
- push_frontend_feature_flag(:boards_with_swimlanes, project, default_enabled: true)
- end
feature_category :boards
diff --git a/app/helpers/defer_script_tag_helper.rb b/app/helpers/defer_script_tag_helper.rb
deleted file mode 100644
index be927c67aaa..00000000000
--- a/app/helpers/defer_script_tag_helper.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-module DeferScriptTagHelper
- # Override the default ActionView `javascript_include_tag` helper to support page specific deferred loading.
- # PLEASE NOTE: `defer` is also critical so that we don't run JavaScript entrypoints before the DOM is ready.
- # Please see https://gitlab.com/groups/gitlab-org/-/epics/4538#note_432159769.
- def javascript_include_tag(*sources)
- super(*sources, defer: true)
- end
-end
diff --git a/app/helpers/gitlab_script_tag_helper.rb b/app/helpers/gitlab_script_tag_helper.rb
new file mode 100644
index 00000000000..467f3f7305b
--- /dev/null
+++ b/app/helpers/gitlab_script_tag_helper.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+module GitlabScriptTagHelper
+ # Override the default ActionView `javascript_include_tag` helper to support page specific deferred loading.
+ # PLEASE NOTE: `defer` is also critical so that we don't run JavaScript entrypoints before the DOM is ready.
+ # Please see https://gitlab.com/groups/gitlab-org/-/epics/4538#note_432159769.
+ # The helper also makes sure the `nonce` attribute is included in every script when the content security
+ # policy is enabled.
+ def javascript_include_tag(*sources)
+ super(*sources, defer: true, nonce: true)
+ end
+
+ # The helper makes sure the `nonce` attribute is included in every script when the content security
+ # policy is enabled.
+ def javascript_tag(content_or_options_with_block = nil, html_options = {})
+ if content_or_options_with_block.is_a?(Hash)
+ content_or_options_with_block[:nonce] = true
+ else
+ html_options[:nonce] = true
+ end
+
+ super
+ end
+end
diff --git a/app/views/layouts/_google_analytics.html.haml b/app/views/layouts/_google_analytics.html.haml
index e8a5359e791..759e9ef36b9 100644
--- a/app/views/layouts/_google_analytics.html.haml
+++ b/app/views/layouts/_google_analytics.html.haml
@@ -1,4 +1,4 @@
-= javascript_tag nonce: true do
+= javascript_tag do
:plain
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '#{extra_config.google_analytics_id}']);
diff --git a/app/views/layouts/_google_tag_manager_head.html.haml b/app/views/layouts/_google_tag_manager_head.html.haml
index ab03f1e7670..48eb9e40cc4 100644
--- a/app/views/layouts/_google_tag_manager_head.html.haml
+++ b/app/views/layouts/_google_tag_manager_head.html.haml
@@ -1,5 +1,5 @@
- if google_tag_manager_enabled?
- = javascript_tag nonce: true do
+ = javascript_tag do
:plain
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
diff --git a/app/views/layouts/_img_loader.html.haml b/app/views/layouts/_img_loader.html.haml
index cddcd6e0af6..f6d7d163e6f 100644
--- a/app/views/layouts/_img_loader.html.haml
+++ b/app/views/layouts/_img_loader.html.haml
@@ -1,4 +1,4 @@
-= javascript_tag nonce: true do
+= javascript_tag do
:plain
if ('loading' in HTMLImageElement.prototype) {
document.querySelectorAll('img.lazy').forEach(img => {
diff --git a/app/views/layouts/_init_auto_complete.html.haml b/app/views/layouts/_init_auto_complete.html.haml
index 82ec92988eb..509f5be8097 100644
--- a/app/views/layouts/_init_auto_complete.html.haml
+++ b/app/views/layouts/_init_auto_complete.html.haml
@@ -4,7 +4,7 @@
- datasources = autocomplete_data_sources(object, noteable_type)
- if object
- = javascript_tag nonce: true do
+ = javascript_tag do
:plain
gl = window.gl || {};
gl.GfmAutoComplete = gl.GfmAutoComplete || {};
diff --git a/app/views/layouts/_init_client_detection_flags.html.haml b/app/views/layouts/_init_client_detection_flags.html.haml
index 6537b86085f..03967bbbfcf 100644
--- a/app/views/layouts/_init_client_detection_flags.html.haml
+++ b/app/views/layouts/_init_client_detection_flags.html.haml
@@ -1,7 +1,7 @@
- client = client_js_flags
- if client
- = javascript_tag nonce: true do
+ = javascript_tag do
:plain
gl = window.gl || {};
gl.client = #{client.to_json};
diff --git a/app/views/layouts/_matomo.html.haml b/app/views/layouts/_matomo.html.haml
index 1297d120683..fcd3156a162 100644
--- a/app/views/layouts/_matomo.html.haml
+++ b/app/views/layouts/_matomo.html.haml
@@ -1,5 +1,5 @@
<!-- Matomo -->
-= javascript_tag nonce: true do
+= javascript_tag do
:plain
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
diff --git a/app/views/layouts/_snowplow.html.haml b/app/views/layouts/_snowplow.html.haml
index d7ff5ad1094..9d14dfb3786 100644
--- a/app/views/layouts/_snowplow.html.haml
+++ b/app/views/layouts/_snowplow.html.haml
@@ -1,6 +1,6 @@
- return unless Gitlab::CurrentSettings.snowplow_enabled?
-= javascript_tag nonce: true do
+= javascript_tag do
:plain
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
diff --git a/app/views/layouts/_startup_css_activation.haml b/app/views/layouts/_startup_css_activation.haml
index a426d686c34..5fb53385acc 100644
--- a/app/views/layouts/_startup_css_activation.haml
+++ b/app/views/layouts/_startup_css_activation.haml
@@ -1,6 +1,6 @@
- return unless use_startup_css?
-= javascript_tag nonce: true do
+= javascript_tag do
:plain
document.querySelectorAll('link[media="print"]').forEach(linkTag => {
linkTag.setAttribute('data-startupcss', 'loading');
diff --git a/app/views/layouts/_startup_js.html.haml b/app/views/layouts/_startup_js.html.haml
index 9c488e4f40d..35cd191c600 100644
--- a/app/views/layouts/_startup_js.html.haml
+++ b/app/views/layouts/_startup_js.html.haml
@@ -1,6 +1,6 @@
- return unless page_startup_api_calls.present? || page_startup_graphql_calls.present?
-= javascript_tag nonce: true do
+= javascript_tag do
:plain
var gl = window.gl || {};
gl.startup_calls = #{page_startup_api_calls.to_json};
diff --git a/app/views/layouts/errors.html.haml b/app/views/layouts/errors.html.haml
index dc924a0e25d..25fe4c898ca 100644
--- a/app/views/layouts/errors.html.haml
+++ b/app/views/layouts/errors.html.haml
@@ -8,7 +8,7 @@
%body
.page-container
= yield
- = javascript_tag nonce: true do
+ = javascript_tag do
:plain
(function(){
var goBackElement = document.querySelector('.js-go-back');
diff --git a/app/views/layouts/group.html.haml b/app/views/layouts/group.html.haml
index 6d2c5870e43..58fed89dfe7 100644
--- a/app/views/layouts/group.html.haml
+++ b/app/views/layouts/group.html.haml
@@ -8,7 +8,7 @@
- content_for :page_specific_javascripts do
- if current_user
- = javascript_tag nonce: true do
+ = javascript_tag do
:plain
window.uploads_path = "#{group_uploads_path(@group)}";
diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml
index 62e5431e290..2df502d2899 100644
--- a/app/views/layouts/project.html.haml
+++ b/app/views/layouts/project.html.haml
@@ -10,7 +10,7 @@
- content_for :project_javascripts do
- project = @target_project || @project
- if current_user
- = javascript_tag nonce: true do
+ = javascript_tag do
:plain
window.uploads_path = "#{project_uploads_path(project)}";
diff --git a/app/views/layouts/snippets.html.haml b/app/views/layouts/snippets.html.haml
index 6cc53ba3342..54b5ec85ccc 100644
--- a/app/views/layouts/snippets.html.haml
+++ b/app/views/layouts/snippets.html.haml
@@ -4,7 +4,7 @@
- content_for :page_specific_javascripts do
- if snippets_upload_path
- = javascript_tag nonce: true do
+ = javascript_tag do
:plain
window.uploads_path = "#{snippets_upload_path}";
diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml
index 138f5569218..8b4411776bc 100644
--- a/app/views/projects/ci/builds/_build.html.haml
+++ b/app/views/projects/ci/builds/_build.html.haml
@@ -97,7 +97,7 @@
#{job.coverage}%
%td
- .float-right
+ .gl-display-flex
- if can?(current_user, :read_build, job) && job.artifacts?
= link_to download_project_job_artifacts_path(job.project, job), rel: 'nofollow', download: '', title: _('Download artifacts'), class: 'btn btn-build gl-button btn-icon btn-svg' do
= sprite_icon('download')
diff --git a/app/views/projects/merge_requests/_widget.html.haml b/app/views/projects/merge_requests/_widget.html.haml
index 9736071b03f..123affeb5d6 100644
--- a/app/views/projects/merge_requests/_widget.html.haml
+++ b/app/views/projects/merge_requests/_widget.html.haml
@@ -1,4 +1,4 @@
-= javascript_tag nonce: true do
+= javascript_tag do
:plain
window.gl = window.gl || {};
window.gl.mrWidgetData = #{serialize_issuable(@merge_request, serializer: 'widget', issues_links: true)}
diff --git a/app/views/shared/boards/_show.html.haml b/app/views/shared/boards/_show.html.haml
index ce48691166b..74c36af56fa 100644
--- a/app/views/shared/boards/_show.html.haml
+++ b/app/views/shared/boards/_show.html.haml
@@ -17,23 +17,12 @@
= render 'shared/issuable/search_bar', type: :boards, board: board
#board-app.boards-app.position-relative{ "v-cloak" => "true", data: board_data, ":class" => "{ 'is-compact': detailIssueVisible }" }
- - if Feature.enabled?(:boards_with_swimlanes, current_board_parent, default_enabled: true) || Feature.enabled?(:graphql_board_lists, current_board_parent)
- %board-content{ "v-cloak" => "true",
- "ref" => "board_content",
- ":lists" => "state.lists",
- ":can-admin-list" => can_admin_list,
- ":disabled" => "disabled" }
- - else
- .boards-list.w-100.py-3.px-2.text-nowrap{ data: { qa_selector: "boards_list" } }
- .boards-app-loading.w-100.text-center{ "v-if" => "loading" }
- = loading_icon(css_class: 'gl-mb-3')
- %board{ "v-cloak" => "true",
- "v-for" => "list in state.lists",
- "ref" => "board",
- ":can-admin-list" => can_admin_list,
- ":list" => "list",
- ":disabled" => "disabled",
- ":key" => "list.id" }
+ %board-content{ "v-cloak" => "true",
+ "ref" => "board_content",
+ ":lists" => "state.lists",
+ ":can-admin-list" => can_admin_list,
+ ":disabled" => "disabled",
+ data: { qa_selector: "boards_list" } }
= render "shared/boards/components/sidebar", group: group
%board-settings-sidebar{ ":can-admin-list" => can_admin_list }
- if @project
diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml
index 00b235809ed..5df7ade8609 100644
--- a/app/views/shared/issuable/_search_bar.html.haml
+++ b/app/views/shared/issuable/_search_bar.html.haml
@@ -182,7 +182,7 @@
= render 'shared/issuable/board_create_list_dropdown', board: board
- if @project
#js-add-issues-btn.gl-ml-3{ data: { can_admin_list: can?(current_user, :admin_list, @project) } }
- - if current_user && Feature.enabled?(:boards_with_swimlanes, @group, default_enabled: true)
+ - if current_user
#js-board-epics-swimlanes-toggle
#js-toggle-focus-btn
- elsif is_not_boards_modal_or_productivity_analytics && show_sorting_dropdown
diff --git a/changelogs/unreleased/fix-misaligned-job-buttons-24395.yml b/changelogs/unreleased/fix-misaligned-job-buttons-24395.yml
new file mode 100644
index 00000000000..f062e2e3258
--- /dev/null
+++ b/changelogs/unreleased/fix-misaligned-job-buttons-24395.yml
@@ -0,0 +1,5 @@
+---
+title: Fix misaligned buttons for CI Jobs page
+merge_request: 48332
+author: mgandres
+type: fixed
diff --git a/config/feature_flags/development/boards_with_swimlanes.yml b/config/feature_flags/development/boards_with_swimlanes.yml
deleted file mode 100644
index 7080bceb777..00000000000
--- a/config/feature_flags/development/boards_with_swimlanes.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: boards_with_swimlanes
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/218040
-rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/238222
-milestone: 13.6
-group: group::product planning
-type: development
-default_enabled: true
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 5bac589415a..d0c4cccd874 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -785,8 +785,8 @@ Settings.forti_authenticator['port'] = 443 if Settings.forti_authenticator['port
# Extra customization
#
Settings['extra'] ||= Settingslogic.new({})
-Settings.extra['matomo_site_id'] ||= Settings.extra['piwik_site_id']
-Settings.extra['matomo_url'] ||= Settings.extra['piwik_url']
+Settings.extra['matomo_site_id'] ||= Settings.extra['piwik_site_id'] if Settings.extra['piwik_site_id'].present?
+Settings.extra['matomo_url'] ||= Settings.extra['piwik_url'] if Settings.extra['piwik_url'].present?
#
# Rack::Attack settings
diff --git a/doc/.vale/gitlab/Acronyms.yml b/doc/.vale/gitlab/Acronyms.yml
index 494b1e42d2f..bc4b49d89b4 100644
--- a/doc/.vale/gitlab/Acronyms.yml
+++ b/doc/.vale/gitlab/Acronyms.yml
@@ -22,11 +22,13 @@ exceptions:
- AWS
- BSD
- CLI
+ - CNA
- CNAME
- CORE
- CPU
- CSS
- CSV
+ - CVE
- DAG
- DAST
- DHCP
diff --git a/doc/administration/img/audit_log_v13_6.png b/doc/administration/img/audit_log_v13_6.png
index 3268f864e81..82ff3e9c87b 100644
--- a/doc/administration/img/audit_log_v13_6.png
+++ b/doc/administration/img/audit_log_v13_6.png
Binary files differ
diff --git a/doc/ci/quick_start/img/job_details_v13_6.png b/doc/ci/quick_start/img/job_details_v13_6.png
index e94287f90ba..073ebc99b6d 100644
--- a/doc/ci/quick_start/img/job_details_v13_6.png
+++ b/doc/ci/quick_start/img/job_details_v13_6.png
Binary files differ
diff --git a/doc/ci/quick_start/img/pipeline_graph_v13_6.png b/doc/ci/quick_start/img/pipeline_graph_v13_6.png
index fcf7e02d1f3..cb045125287 100644
--- a/doc/ci/quick_start/img/pipeline_graph_v13_6.png
+++ b/doc/ci/quick_start/img/pipeline_graph_v13_6.png
Binary files differ
diff --git a/doc/ci/quick_start/img/three_stages_v13_6.png b/doc/ci/quick_start/img/three_stages_v13_6.png
index a6c049e3e6c..c69581015a9 100644
--- a/doc/ci/quick_start/img/three_stages_v13_6.png
+++ b/doc/ci/quick_start/img/three_stages_v13_6.png
Binary files differ
diff --git a/doc/development/img/bulk_imports_overview_v13_7.png b/doc/development/img/bulk_imports_overview_v13_7.png
index 405ab7b1815..25c8685c390 100644
--- a/doc/development/img/bulk_imports_overview_v13_7.png
+++ b/doc/development/img/bulk_imports_overview_v13_7.png
Binary files differ
diff --git a/doc/integration/img/sourcegraph_admin_v12_5.png b/doc/integration/img/sourcegraph_admin_v12_5.png
index e42371a681e..7e2df9410ce 100644
--- a/doc/integration/img/sourcegraph_admin_v12_5.png
+++ b/doc/integration/img/sourcegraph_admin_v12_5.png
Binary files differ
diff --git a/doc/user/group/img/group_code_coverage_analytics_v13_7.png b/doc/user/group/img/group_code_coverage_analytics_v13_7.png
index fc670ff99e4..769953b1355 100644
--- a/doc/user/group/img/group_code_coverage_analytics_v13_7.png
+++ b/doc/user/group/img/group_code_coverage_analytics_v13_7.png
Binary files differ
diff --git a/doc/user/packages/index.md b/doc/user/packages/index.md
index 7586b0066f6..d9f79505eea 100644
--- a/doc/user/packages/index.md
+++ b/doc/user/packages/index.md
@@ -32,8 +32,8 @@ You can also use the [API](../../api/packages.md) to administer the Package Regi
## Accepting contributions
-The below table lists formats that are not supported, but are accepting Community contributions for. Consider contributing to GitLab. This [development documentation](../../development/packages.md) will
-guide you through the process.
+The below table lists formats that are not supported, but are accepting Community contributions for. Consider contributing to GitLab. This [development documentation](../../development/packages.md)
+guides you through the process.
| Format | Status |
| ------ | ------ |
diff --git a/doc/user/packages/pypi_repository/index.md b/doc/user/packages/pypi_repository/index.md
index 9490981f81f..e78224f89d1 100644
--- a/doc/user/packages/pypi_repository/index.md
+++ b/doc/user/packages/pypi_repository/index.md
@@ -237,11 +237,11 @@ When publishing packages, note that:
- The maximum allowed size is 50 MB.
- You can't upload the same version of a package multiple times. If you try,
- you'll receive the error `Validation failed: File name has already been taken`.
+ you receive the error `Validation failed: File name has already been taken`.
### Ensure your version string is valid
-If your version string (for example, `0.0.1`) isn't valid, it will be rejected.
+If your version string (for example, `0.0.1`) isn't valid, it gets rejected.
GitLab uses the following regex to validate the version string.
```ruby
diff --git a/doc/user/project/img/service_desk_issue_tracker.png b/doc/user/project/img/service_desk_issue_tracker.png
index c9cf31286cf..0fde4c182cf 100644
--- a/doc/user/project/img/service_desk_issue_tracker.png
+++ b/doc/user/project/img/service_desk_issue_tracker.png
Binary files differ
diff --git a/lib/gitlab/ci/templates/npm.gitlab-ci.yml b/lib/gitlab/ci/templates/npm.gitlab-ci.yml
index 0a739cf122d..035ba52da84 100644
--- a/lib/gitlab/ci/templates/npm.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/npm.gitlab-ci.yml
@@ -55,5 +55,5 @@ publish_package:
npm publish &&
echo "Successfully published version ${NPM_PACKAGE_VERSION} of ${NPM_PACKAGE_NAME} to GitLab's NPM registry: ${CI_PROJECT_URL}/-/packages"
} || {
- echo "No new version of ${NPM_PACKAGE_NAME} published. This is most likely because version ${NPM_PACKAGE_VERSION} already exists in GitLab's NPM registry."; exit 1
+ echo "No new version of ${NPM_PACKAGE_NAME} published. This is most likely because version ${NPM_PACKAGE_VERSION} already exists in GitLab's NPM registry."
}
diff --git a/lib/gitlab/usage_data_counters/known_events/package_events.yml b/lib/gitlab/usage_data_counters/known_events/package_events.yml
index 7ed02aa2a85..e163435becd 100644
--- a/lib/gitlab/usage_data_counters/known_events/package_events.yml
+++ b/lib/gitlab/usage_data_counters/known_events/package_events.yml
@@ -3,263 +3,329 @@
category: maven_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_maven_deploy_token_push
category: maven_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_maven_user_delete
category: maven_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_maven_deploy_token_delete
category: maven_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_maven_user_pull
category: maven_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_maven_deploy_token_pull
category: maven_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_npm_user_push
category: npm_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_npm_deploy_token_push
category: npm_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_npm_user_delete
category: npm_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_npm_deploy_token_delete
category: npm_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_npm_user_pull
category: npm_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_npm_deploy_token_pull
category: npm_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_conan_user_push
category: conan_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_conan_deploy_token_push
category: conan_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_conan_user_delete
category: conan_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_conan_deploy_token_delete
category: conan_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_conan_user_pull
category: conan_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_conan_deploy_token_pull
category: conan_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_nuget_user_push
category: nuget_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_nuget_deploy_token_push
category: nuget_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_nuget_user_delete
category: nuget_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_nuget_deploy_token_delete
category: nuget_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_nuget_user_pull
category: nuget_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_nuget_deploy_token_pull
category: nuget_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_pypi_user_push
category: pypi_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_pypi_deploy_token_push
category: pypi_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_pypi_user_delete
category: pypi_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_pypi_deploy_token_delete
category: pypi_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_pypi_user_pull
category: pypi_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_pypi_deploy_token_pull
category: pypi_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_composer_user_push
category: composer_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_composer_deploy_token_push
category: composer_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_composer_user_delete
category: composer_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_composer_deploy_token_delete
category: composer_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_composer_user_pull
category: composer_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_composer_deploy_token_pull
category: composer_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_generic_user_push
category: generic_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_generic_deploy_token_push
category: generic_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_generic_user_delete
category: generic_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_generic_deploy_token_delete
category: generic_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_generic_user_pull
category: generic_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_generic_deploy_token_pull
category: generic_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_golang_user_push
category: golang_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_golang_deploy_token_push
category: golang_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_golang_user_delete
category: golang_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_golang_deploy_token_delete
category: golang_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_golang_user_pull
category: golang_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_golang_deploy_token_pull
category: golang_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_debian_user_push
category: debian_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_debian_deploy_token_push
category: debian_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_debian_user_delete
category: debian_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_debian_deploy_token_delete
category: debian_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_debian_user_pull
category: debian_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_debian_deploy_token_pull
category: debian_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_container_user_push
category: container_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_container_deploy_token_push
category: container_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_container_user_delete
category: container_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_container_deploy_token_delete
category: container_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_container_user_pull
category: container_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_container_deploy_token_pull
category: container_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_tag_user_push
category: tag_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_tag_deploy_token_push
category: tag_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_tag_user_delete
category: tag_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_tag_deploy_token_delete
category: tag_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_tag_user_pull
category: tag_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
- name: i_package_tag_deploy_token_pull
category: tag_packages
aggregation: weekly
redis_slot: package
+ feature_flag: collect_package_events_redis
diff --git a/lib/tasks/gitlab/packages/events.rake b/lib/tasks/gitlab/packages/events.rake
index 3484b9b6072..68f114533d5 100644
--- a/lib/tasks/gitlab/packages/events.rake
+++ b/lib/tasks/gitlab/packages/events.rake
@@ -29,7 +29,8 @@ namespace :gitlab do
"name" => name,
"category" => "#{event_scope}_packages",
"aggregation" => "weekly",
- "redis_slot" => "package"
+ "redis_slot" => "package",
+ "feature_flag" => "collect_package_events_redis"
}
end
end
diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_merge_ref_diff_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_merge_ref_diff_spec.rb
index 970615e8b90..40c22d6c78c 100644
--- a/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_merge_ref_diff_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_merge_ref_diff_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- RSpec.describe 'Create', :requires_admin do
+ RSpec.describe 'Create', :requires_admin, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/261793', type: :investigating } do
describe 'View merge request merge-ref diff' do
let(:project) do
Resource::Project.fabricate_via_api! do |project|
diff --git a/scripts/lint-doc.sh b/scripts/lint-doc.sh
index 9ae6ce400da..7dac15c6314 100755
--- a/scripts/lint-doc.sh
+++ b/scripts/lint-doc.sh
@@ -65,10 +65,16 @@ then
echo "Merge request pipeline (detached) detected. Testing all files."
else
MERGE_BASE=$(git merge-base ${CI_MERGE_REQUEST_TARGET_BRANCH_SHA} ${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA})
- MD_DOC_PATH=$(git diff --name-only "${MERGE_BASE}..${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}" 'doc/*.md')
- if [ -n "${MD_DOC_PATH}" ]
+ if git diff --name-only "${MERGE_BASE}..${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}" | grep -E "\.vale|\.markdownlint|lint-doc\.sh"
then
- echo -e "Merged results pipeline detected. Testing only the following files:\n${MD_DOC_PATH}"
+ MD_DOC_PATH=${MD_DOC_PATH:-doc}
+ echo "Vale, Markdownlint, or lint-doc.sh configuration changed. Testing all files."
+ else
+ MD_DOC_PATH=$(git diff --name-only "${MERGE_BASE}..${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}" 'doc/*.md')
+ if [ -n "${MD_DOC_PATH}" ]
+ then
+ echo -e "Merged results pipeline detected. Testing only the following files:\n${MD_DOC_PATH}"
+ fi
fi
fi
diff --git a/scripts/used-feature-flags b/scripts/used-feature-flags
index 07b8d2063ef..6fc3a2f7d10 100755
--- a/scripts/used-feature-flags
+++ b/scripts/used-feature-flags
@@ -1,5 +1,7 @@
#!/usr/bin/env ruby
+require 'set'
+
class String
def red
"\e[31m#{self}\e[0m"
diff --git a/spec/frontend/boards/list_spec.js b/spec/frontend/boards/list_spec.js
index 9c3a6e66ef4..b731bb6e474 100644
--- a/spec/frontend/boards/list_spec.js
+++ b/spec/frontend/boards/list_spec.js
@@ -184,7 +184,6 @@ describe('List model', () => {
}),
);
list.issues = [];
- global.gon.features = { boardsWithSwimlanes: false };
});
it('adds new issue to top of list', done => {
diff --git a/spec/frontend/boards/stores/getters_spec.js b/spec/frontend/boards/stores/getters_spec.js
index 64025726dd1..fd63d6e9c82 100644
--- a/spec/frontend/boards/stores/getters_spec.js
+++ b/spec/frontend/boards/stores/getters_spec.js
@@ -51,52 +51,8 @@ describe('Boards - Getters', () => {
window.gon = { features: {} };
});
- describe('when boardsWithSwimlanes is true', () => {
- beforeEach(() => {
- window.gon = { features: { boardsWithSwimlanes: true } };
- });
-
- describe('when isShowingEpicsSwimlanes is true', () => {
- it('returns true', () => {
- const state = {
- isShowingEpicsSwimlanes: true,
- };
-
- expect(getters.isSwimlanesOn(state)).toBe(true);
- });
- });
-
- describe('when isShowingEpicsSwimlanes is false', () => {
- it('returns false', () => {
- const state = {
- isShowingEpicsSwimlanes: false,
- };
-
- expect(getters.isSwimlanesOn(state)).toBe(false);
- });
- });
- });
-
- describe('when boardsWithSwimlanes is false', () => {
- describe('when isShowingEpicsSwimlanes is true', () => {
- it('returns false', () => {
- const state = {
- isShowingEpicsSwimlanes: true,
- };
-
- expect(getters.isSwimlanesOn(state)).toBe(false);
- });
- });
-
- describe('when isShowingEpicsSwimlanes is false', () => {
- it('returns false', () => {
- const state = {
- isShowingEpicsSwimlanes: false,
- };
-
- expect(getters.isSwimlanesOn(state)).toBe(false);
- });
- });
+ it('returns false', () => {
+ expect(getters.isSwimlanesOn()).toBe(false);
});
});
diff --git a/spec/helpers/defer_script_tag_helper_spec.rb b/spec/helpers/defer_script_tag_helper_spec.rb
deleted file mode 100644
index 14317e353ab..00000000000
--- a/spec/helpers/defer_script_tag_helper_spec.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe DeferScriptTagHelper do
- describe 'script tag' do
- script_url = 'test.js'
-
- it 'returns an script tag with defer=true' do
- expect(javascript_include_tag(script_url).to_s)
- .to eq "<script src=\"/javascripts/#{script_url}\" defer=\"defer\"></script>"
- end
- end
-end
diff --git a/spec/helpers/gitlab_script_tag_helper_spec.rb b/spec/helpers/gitlab_script_tag_helper_spec.rb
new file mode 100644
index 00000000000..37413b9b1c2
--- /dev/null
+++ b/spec/helpers/gitlab_script_tag_helper_spec.rb
@@ -0,0 +1,44 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe GitlabScriptTagHelper do
+ before do
+ allow(helper).to receive(:content_security_policy_nonce).and_return('noncevalue')
+ end
+
+ describe 'external script tag' do
+ let(:script_url) { 'test.js' }
+
+ it 'returns a script tag with defer=true and a nonce' do
+ expect(helper.javascript_include_tag(script_url).to_s)
+ .to eq "<script src=\"/javascripts/#{script_url}\" defer=\"defer\" nonce=\"noncevalue\"></script>"
+ end
+ end
+
+ describe 'inline script tag' do
+ let(:tag_with_nonce) {"<script nonce=\"noncevalue\">\n//<![CDATA[\nalert(1)\n//]]>\n</script>"}
+ let(:tag_with_nonce_and_type) {"<script type=\"application/javascript\" nonce=\"noncevalue\">\n//<![CDATA[\nalert(1)\n//]]>\n</script>"}
+
+ it 'returns a script tag with a nonce using block syntax' do
+ expect(helper.javascript_tag { 'alert(1)' }.to_s).to eq tag_with_nonce
+ end
+
+ it 'returns a script tag with a nonce using block syntax with options' do
+ expect(helper.javascript_tag(type: 'application/javascript') { 'alert(1)' }.to_s).to eq tag_with_nonce_and_type
+ end
+
+ it 'returns a script tag with a nonce using argument syntax' do
+ expect(helper.javascript_tag('alert(1)').to_s).to eq tag_with_nonce
+ end
+
+ it 'returns a script tag with a nonce using argument syntax with options' do
+ expect(helper.javascript_tag( 'alert(1)', type: 'application/javascript').to_s).to eq tag_with_nonce_and_type
+ end
+
+ # This scenario does not really make sense, but it's supported so we test it
+ it 'returns a script tag with a nonce using argument and block syntax with options' do
+ expect(helper.javascript_tag( '// ignored', type: 'application/javascript') { 'alert(1)' }.to_s).to eq tag_with_nonce_and_type
+ end
+ end
+end
diff --git a/spec/services/projects/update_pages_service_spec.rb b/spec/services/projects/update_pages_service_spec.rb
index 0b12a0c14e4..850185ae283 100644
--- a/spec/services/projects/update_pages_service_spec.rb
+++ b/spec/services/projects/update_pages_service_spec.rb
@@ -35,13 +35,11 @@ RSpec.describe Projects::UpdatePagesService do
build.reload
end
- describe 'pages artifacts' do
- it "doesn't delete artifacts after deploying" do
- expect(execute).to eq(:success)
+ it "doesn't delete artifacts after deploying" do
+ expect(execute).to eq(:success)
- expect(project.pages_metadatum).to be_deployed
- expect(build.artifacts?).to eq(true)
- end
+ expect(project.pages_metadatum).to be_deployed
+ expect(build.artifacts?).to eq(true)
end
it 'succeeds' do