From e388691e4a5b5b69be903c7eceb606b853719cd5 Mon Sep 17 00:00:00 2001
From: GitLab Bot
Date: Wed, 17 Mar 2021 18:09:01 +0000
Subject: Add latest changes from gitlab-org/gitlab@master
---
CHANGELOG.md | 21 ++++++++
app/assets/javascripts/boards/index.js | 8 ---
.../components/enable_review_app_modal.vue | 19 +++++--
app/assets/javascripts/environments/index.js | 1 +
.../javascripts/feature_flags/components/form.vue | 4 +-
.../components/duplicate_dashboard_form.vue | 2 +-
app/assets/javascripts/mr_notes/init_notes.js | 6 ++-
app/assets/javascripts/mr_notes/stores/actions.js | 12 +++--
.../javascripts/mr_notes/stores/modules/index.js | 3 +-
.../javascripts/mr_notes/stores/mutation_types.js | 1 +
.../javascripts/mr_notes/stores/mutations.js | 3 ++
.../javascripts/pages/admin/users/new/index.js | 6 +--
.../javascripts/pages/projects/jobs/show/index.js | 2 +-
.../components/editor/ci_config_merged_preview.vue | 2 +-
.../components/directory_download_links.vue | 12 ++---
app/assets/stylesheets/page_bundles/boards.scss | 4 +-
.../projects/registry/repositories_controller.rb | 15 +-----
app/graphql/resolvers/group_milestones_resolver.rb | 27 ++++++++--
app/graphql/types/ci/job_type.rb | 4 ++
app/models/experiment.rb | 17 ++++++-
app/services/issuable_links/create_service.rb | 4 +-
app/views/profiles/accounts/show.html.haml | 2 +-
app/views/profiles/chat_names/new.html.haml | 2 +-
app/views/profiles/emails/index.html.haml | 2 +-
app/views/profiles/gpg_keys/_form.html.haml | 2 +-
app/views/profiles/keys/_form.html.haml | 4 +-
app/views/profiles/passwords/edit.html.haml | 2 +-
app/views/profiles/passwords/new.html.haml | 2 +-
app/views/profiles/show.html.haml | 4 +-
app/views/profiles/two_factor_auths/show.html.haml | 2 +-
app/views/projects/environments/index.html.haml | 3 +-
.../creations/_new_compare.html.haml | 2 +-
app/views/projects/merge_requests/show.html.haml | 5 +-
app/views/shared/_file_picker_button.html.haml | 2 +-
app/views/shared/issuable/_search_bar.html.haml | 5 +-
.../273283-update-compare-page-button.yml | 5 ++
...ncludeancestors-to-group-milestones-graphql.yml | 5 ++
changelogs/unreleased/324100-monitor.yml | 5 ++
...649-prevent-experiments-sticking-to-primary.yml | 5 ++
changelogs/unreleased/btn-confirm-download-dir.yml | 5 ++
.../unreleased/btn-confirm-feature-flags.yml | 5 ++
.../unreleased/btn-confirm-user-settings.yml | 5 ++
.../jivanvl-add-fields-to-job-type-graphql.yml | 5 ++
.../jivanvl-fix-icon-size-pipeline-editor.yml | 5 ++
.../kassio-phabricator-enabled-by-default.yml | 5 ++
changelogs/unreleased/mjang-okr-issue300633.yml | 5 ++
.../unreleased/msjr-no-issue-found-for-params.yml | 5 ++
...space_project_container_registry_index-json.yml | 5 ++
.../development/phabricator_import.yml | 2 +-
config/initializers/kramdown_patch.rb | 25 +++++++++
db/structure.sql | 25 ++++-----
doc/api/graphql/reference/index.md | 2 +
doc/integration/vault.md | 26 +++++++---
doc/user/admin_area/credentials_inventory.md | 18 ++++---
.../dependency_scanning/index.md | 47 ++++++++++++++++-
doc/user/group/saml_sso/scim_setup.md | 8 +--
doc/user/project/import/phabricator.md | 11 +---
lib/gitlab/phabricator_import.rb | 2 +-
lib/gitlab/regex.rb | 4 +-
locale/gitlab.pot | 13 +++--
.../registry/repositories_controller_spec.rb | 58 +++++----------------
.../environments/enable_review_app_modal_spec.js | 23 ++++++---
spec/frontend/mr_notes/stores/actions_spec.js | 25 +++++++++
spec/frontend/mr_notes/stores/mutations_spec.js | 15 ++++++
.../directory_download_links_spec.js.snap | 40 ++++++++++-----
.../resolvers/group_milestones_resolver_spec.rb | 51 +++++++++++++++++++
spec/graphql/types/ci/job_type_spec.rb | 2 +
spec/initializers/kramdown_patch_spec.rb | 38 ++++++++++++++
spec/models/experiment_spec.rb | 29 +++++++++--
spec/models/merge_request_spec.rb | 59 ++++++++++++++++++++++
spec/requests/api/graphql/group/milestones_spec.rb | 36 ++++++++++---
spec/requests/api/issue_links_spec.rb | 2 +-
.../projects/issue_links_controller_spec.rb | 2 +-
spec/services/issue_links/create_service_spec.rb | 6 +--
spec/spec_helper.rb | 4 +-
75 files changed, 640 insertions(+), 210 deletions(-)
create mode 100644 changelogs/unreleased/273283-update-compare-page-button.yml
create mode 100644 changelogs/unreleased/323433-add-includeancestors-to-group-milestones-graphql.yml
create mode 100644 changelogs/unreleased/324100-monitor.yml
create mode 100644 changelogs/unreleased/324649-prevent-experiments-sticking-to-primary.yml
create mode 100644 changelogs/unreleased/btn-confirm-download-dir.yml
create mode 100644 changelogs/unreleased/btn-confirm-feature-flags.yml
create mode 100644 changelogs/unreleased/btn-confirm-user-settings.yml
create mode 100644 changelogs/unreleased/jivanvl-add-fields-to-job-type-graphql.yml
create mode 100644 changelogs/unreleased/jivanvl-fix-icon-size-pipeline-editor.yml
create mode 100644 changelogs/unreleased/kassio-phabricator-enabled-by-default.yml
create mode 100644 changelogs/unreleased/mjang-okr-issue300633.yml
create mode 100644 changelogs/unreleased/msjr-no-issue-found-for-params.yml
create mode 100644 changelogs/unreleased/remove-namespace_project_container_registry_index-json.yml
create mode 100644 config/initializers/kramdown_patch.rb
create mode 100644 spec/frontend/mr_notes/stores/actions_spec.js
create mode 100644 spec/frontend/mr_notes/stores/mutations_spec.js
create mode 100644 spec/initializers/kramdown_patch_spec.rb
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 742a3a2d972..faaf5c97a86 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,13 @@
documentation](doc/development/changelog.md) for instructions on adding your own
entry.
+## 13.9.4 (2021-03-17)
+
+### Security (1 change)
+
+- Patch Kramdown syntax highlighter gem.
+
+
## 13.9.3 (2021-03-08)
### Fixed (4 changes)
@@ -610,6 +617,13 @@ entry.
- Apply new GitLab UI for buttons in pipeline schedules.
+## 13.8.6 (2021-03-17)
+
+### Security (1 change)
+
+- Patch Kramdown syntax highlighter gem.
+
+
## 13.8.5 (2021-03-04)
### Security (6 changes)
@@ -1022,6 +1036,13 @@ entry.
- Add verbiage + link sast to show it's in core. !51935
+## 13.7.9 (2021-03-17)
+
+### Security (1 change)
+
+- Patch Kramdown syntax highlighter gem.
+
+
## 13.7.8 (2021-03-04)
### Security (5 changes)
diff --git a/app/assets/javascripts/boards/index.js b/app/assets/javascripts/boards/index.js
index cb22ae3e02c..f0c39d9cf74 100644
--- a/app/assets/javascripts/boards/index.js
+++ b/app/assets/javascripts/boards/index.js
@@ -72,14 +72,6 @@ export default () => {
boardsStore.setTimeTrackingLimitToHours($boardApp.dataset.timeTrackingLimitToHours);
}
- if (gon?.features?.boardsFilteredSearch) {
- import('~/boards/filtered_search')
- .then(({ default: initFilteredSearch }) => {
- initFilteredSearch(apolloProvider);
- })
- .catch(() => {});
- }
-
// eslint-disable-next-line @gitlab/no-runtime-template-compiler
issueBoardsApp = new Vue({
el: $boardApp,
diff --git a/app/assets/javascripts/environments/components/enable_review_app_modal.vue b/app/assets/javascripts/environments/components/enable_review_app_modal.vue
index 2494968857c..b0c0f83b88a 100644
--- a/app/assets/javascripts/environments/components/enable_review_app_modal.vue
+++ b/app/assets/javascripts/environments/components/enable_review_app_modal.vue
@@ -10,6 +10,7 @@ export default {
GlSprintf,
ModalCopyButton,
},
+ inject: ['defaultBranchName'],
props: {
modalId: {
type: String,
@@ -28,7 +29,11 @@ export default {
modalInfo: {
closeText: s__('EnableReviewApp|Close'),
copyToClipboardText: s__('EnableReviewApp|Copy snippet text'),
- copyString: `deploy_review:
+ title: s__('ReviewApp|Enable Review App'),
+ },
+ computed: {
+ modalInfoCopyStr() {
+ return `deploy_review:
stage: deploy
script:
- echo "Deploy a review app"
@@ -38,8 +43,8 @@ export default {
only:
- branches
except:
- - master`,
- title: s__('ReviewApp|Enable Review App'),
+ - ${this.defaultBranchName}`;
+ },
},
};
@@ -75,7 +80,9 @@ export default {
-
{{ $options.modalInfo.copyString }}
+
+ {{ modalInfoCopyStr }}
{{ content }}
- {{ content }}
+ {{
+ content
+ }}
diff --git a/app/assets/javascripts/environments/index.js b/app/assets/javascripts/environments/index.js
index 68348648e61..b99872f7a6c 100644
--- a/app/assets/javascripts/environments/index.js
+++ b/app/assets/javascripts/environments/index.js
@@ -22,6 +22,7 @@ export default () => {
apolloProvider,
provide: {
projectPath: el.dataset.projectPath,
+ defaultBranchName: el.dataset.defaultBranchName,
},
data() {
const environmentsData = el.dataset;
diff --git a/app/assets/javascripts/feature_flags/components/form.vue b/app/assets/javascripts/feature_flags/components/form.vue
index f6a14d9996f..1f59b709aa2 100644
--- a/app/assets/javascripts/feature_flags/components/form.vue
+++ b/app/assets/javascripts/feature_flags/components/form.vue
@@ -314,7 +314,7 @@ export default {
{{ s__('FeatureFlags|Strategies') }}
{{ $options.translations.newHelpText }}
-
+
{{ s__('FeatureFlags|Add strategy') }}
@@ -575,7 +575,7 @@ export default {
ref="submitButton"
:disabled="readOnly"
type="button"
- variant="success"
+ variant="confirm"
class="js-ff-submit col-xs-12"
@click="handleSubmit"
>{{ submitText }} {
return {
noteableData,
+ endpoints: {
+ metadata: notesDataset.endpointMetadata,
+ },
currentUserData: JSON.parse(notesDataset.currentUserData),
notesData: JSON.parse(notesDataset.notesData),
helpPagePath: notesDataset.helpPagePath,
@@ -54,6 +57,7 @@ export default () => {
},
created() {
this.setActiveTab(window.mrTabs.getCurrentAction());
+ this.setEndpoints(this.endpoints);
},
mounted() {
this.notesCountBadge = $('.issuable-details').find('.notes-tab .badge');
@@ -65,7 +69,7 @@ export default () => {
window.mrTabs.eventHub.$off('MergeRequestTabChange', this.setActiveTab);
},
methods: {
- ...mapActions(['setActiveTab']),
+ ...mapActions(['setActiveTab', 'setEndpoints']),
updateDiscussionTabCounter() {
this.notesCountBadge.text(this.discussionTabCounter);
},
diff --git a/app/assets/javascripts/mr_notes/stores/actions.js b/app/assets/javascripts/mr_notes/stores/actions.js
index 426c6a00d5e..d1874dcb214 100644
--- a/app/assets/javascripts/mr_notes/stores/actions.js
+++ b/app/assets/javascripts/mr_notes/stores/actions.js
@@ -1,7 +1,9 @@
import types from './mutation_types';
-export default {
- setActiveTab({ commit }, tab) {
- commit(types.SET_ACTIVE_TAB, tab);
- },
-};
+export function setActiveTab({ commit }, tab) {
+ commit(types.SET_ACTIVE_TAB, tab);
+}
+
+export function setEndpoints({ commit }, endpoints) {
+ commit(types.SET_ENDPOINTS, endpoints);
+}
diff --git a/app/assets/javascripts/mr_notes/stores/modules/index.js b/app/assets/javascripts/mr_notes/stores/modules/index.js
index c28e666943b..6e228c62a72 100644
--- a/app/assets/javascripts/mr_notes/stores/modules/index.js
+++ b/app/assets/javascripts/mr_notes/stores/modules/index.js
@@ -1,9 +1,10 @@
-import actions from '../actions';
+import * as actions from '../actions';
import getters from '../getters';
import mutations from '../mutations';
export default () => ({
state: {
+ endpoints: {},
activeTab: null,
},
actions,
diff --git a/app/assets/javascripts/mr_notes/stores/mutation_types.js b/app/assets/javascripts/mr_notes/stores/mutation_types.js
index 105104361cf..67fa63f882d 100644
--- a/app/assets/javascripts/mr_notes/stores/mutation_types.js
+++ b/app/assets/javascripts/mr_notes/stores/mutation_types.js
@@ -1,3 +1,4 @@
export default {
SET_ACTIVE_TAB: 'SET_ACTIVE_TAB',
+ SET_ENDPOINTS: 'SET_ENDPOINTS',
};
diff --git a/app/assets/javascripts/mr_notes/stores/mutations.js b/app/assets/javascripts/mr_notes/stores/mutations.js
index 8175aa9488f..3843103f4d0 100644
--- a/app/assets/javascripts/mr_notes/stores/mutations.js
+++ b/app/assets/javascripts/mr_notes/stores/mutations.js
@@ -4,4 +4,7 @@ export default {
[types.SET_ACTIVE_TAB](state, tab) {
Object.assign(state, { activeTab: tab });
},
+ [types.SET_ENDPOINTS](state, endpoints) {
+ Object.assign(state, { endpoints });
+ },
};
diff --git a/app/assets/javascripts/pages/admin/users/new/index.js b/app/assets/javascripts/pages/admin/users/new/index.js
index 7b7d4c169ef..01710246c86 100644
--- a/app/assets/javascripts/pages/admin/users/new/index.js
+++ b/app/assets/javascripts/pages/admin/users/new/index.js
@@ -45,7 +45,5 @@ export default class UserInternalRegexHandler {
}
}
-document.addEventListener('DOMContentLoaded', () => {
- // eslint-disable-next-line
- new UserInternalRegexHandler();
-});
+// eslint-disable-next-line no-new
+new UserInternalRegexHandler();
diff --git a/app/assets/javascripts/pages/projects/jobs/show/index.js b/app/assets/javascripts/pages/projects/jobs/show/index.js
index d57dbeb1242..6fef057dee0 100644
--- a/app/assets/javascripts/pages/projects/jobs/show/index.js
+++ b/app/assets/javascripts/pages/projects/jobs/show/index.js
@@ -1,3 +1,3 @@
import initJobDetails from '~/jobs';
-document.addEventListener('DOMContentLoaded', initJobDetails);
+initJobDetails();
diff --git a/app/assets/javascripts/pipeline_editor/components/editor/ci_config_merged_preview.vue b/app/assets/javascripts/pipeline_editor/components/editor/ci_config_merged_preview.vue
index f36b22f33c3..459580c86d6 100644
--- a/app/assets/javascripts/pipeline_editor/components/editor/ci_config_merged_preview.vue
+++ b/app/assets/javascripts/pipeline_editor/components/editor/ci_config_merged_preview.vue
@@ -82,7 +82,7 @@ export default {
-
+
{{ $options.i18n.viewOnlyMessage }}
diff --git a/app/assets/javascripts/repository/components/directory_download_links.vue b/app/assets/javascripts/repository/components/directory_download_links.vue
index 8c029fc9973..c222a83300d 100644
--- a/app/assets/javascripts/repository/components/directory_download_links.vue
+++ b/app/assets/javascripts/repository/components/directory_download_links.vue
@@ -1,9 +1,9 @@