Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-04-18 21:08:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-18 21:08:42 +0300
commit9f2bc6fc4c27d0703260352c79463fbc62555ac8 (patch)
treeb65188898a054771df56298e4737837e999c8866 /app
parentb6b9abb7cdb61f18d6fc5222e52486d7f6c482dc (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/monitoring/stores/actions.js2
-rw-r--r--app/assets/javascripts/repository/components/fork_info.vue1
-rw-r--r--app/assets/javascripts/repository/components/fork_sync_conflicts_modal.vue28
-rw-r--r--app/assets/javascripts/super_sidebar/components/super_sidebar.vue2
-rw-r--r--app/controllers/admin/plan_limits_controller.rb2
-rw-r--r--app/finders/fork_targets_finder.rb2
-rw-r--r--app/models/user.rb3
7 files changed, 21 insertions, 19 deletions
diff --git a/app/assets/javascripts/monitoring/stores/actions.js b/app/assets/javascripts/monitoring/stores/actions.js
index 4fdc08487f2..32e85262882 100644
--- a/app/assets/javascripts/monitoring/stores/actions.js
+++ b/app/assets/javascripts/monitoring/stores/actions.js
@@ -40,7 +40,7 @@ function prometheusMetricQueryParams(timeRange) {
* Extract error messages from API or HTTP request errors.
*
* - API errors are in `error.response.data.message`
- * - HTTP (axios) errors are in `error.messsage`
+ * - HTTP (axios) errors are in `error.message`
*
* @param {Object} error
* @returns {String} User friendly error message
diff --git a/app/assets/javascripts/repository/components/fork_info.vue b/app/assets/javascripts/repository/components/fork_info.vue
index 99cbe555a2d..f3dbf98312e 100644
--- a/app/assets/javascripts/repository/components/fork_info.vue
+++ b/app/assets/javascripts/repository/components/fork_info.vue
@@ -332,6 +332,7 @@ export default {
</div>
<conflicts-modal
ref="modal"
+ :selected-branch="selectedBranch"
:source-name="sourceName"
:source-path="sourcePath"
:source-default-branch="sourceDefaultBranch"
diff --git a/app/assets/javascripts/repository/components/fork_sync_conflicts_modal.vue b/app/assets/javascripts/repository/components/fork_sync_conflicts_modal.vue
index 0bfb90bb3ec..ffe4fd4cd38 100644
--- a/app/assets/javascripts/repository/components/fork_sync_conflicts_modal.vue
+++ b/app/assets/javascripts/repository/components/fork_sync_conflicts_modal.vue
@@ -19,10 +19,9 @@ export const i18n = {
"ForksDivergence|Fetch the latest changes from the upstream repository's default branch:",
),
step2Text: s__(
- "ForksDivergence|Check out to a new branch, and merge the changes from the upstream project's default branch. You likely need to resolve conflicts during this step.",
+ "ForksDivergence|Check out to a branch, and merge the changes from the upstream project's default branch. You likely need to resolve conflicts during this step.",
),
step3Text: s__('ForksDivergence|Push the updates to remote:'),
- step4Text: s__("ForksDivergence|Create a merge request to your project's default branch."),
copyToClipboard: __('Copy to clipboard'),
close: __('Close'),
};
@@ -53,12 +52,20 @@ export default {
required: false,
default: '',
},
+ selectedBranch: {
+ type: String,
+ required: true,
+ default: '',
+ },
},
computed: {
instructionsStep1() {
const baseUrl = getBaseURL();
return `git fetch ${baseUrl}${this.sourcePath} ${this.sourceDefaultBranch}`;
},
+ instructionsStep2() {
+ return `git checkout ${this.selectedBranch}\ngit merge FETCH_HEAD`;
+ },
},
methods: {
show() {
@@ -69,9 +76,7 @@ export default {
},
},
i18n,
- instructionsStep2: 'git checkout -b &lt;new-branch-name&gt;\ngit merge FETCH_HEAD',
- instructionsStep2Clipboard: 'git checkout -b <new-branch-name>\ngit merge FETCH_HEAD',
- instructionsStep3: 'git commit\ngit push',
+ instructionsStep3: 'git push',
};
</script>
<template>
@@ -100,14 +105,12 @@ export default {
<b> {{ $options.i18n.step2 }}</b> {{ $options.i18n.step2Text }}
</p>
<div class="gl-display-flex gl-mb-4">
- <pre
- class="gl-w-full gl-mb-0 gl-mr-3"
- data-testid="resolve-conflict-instructions"
- v-html="$options.instructionsStep2 /* eslint-disable-line vue/no-v-html */"
- ></pre>
+ <pre class="gl-w-full gl-mb-0 gl-mr-3" data-testid="resolve-conflict-instructions">{{
+ instructionsStep2
+ }}</pre>
<modal-copy-button
modal-id="fork-sync-conflicts-modal"
- :text="$options.instructionsStep2Clipboard"
+ :text="instructionsStep2"
:title="$options.i18n.copyToClipboard"
class="gl-shadow-none! gl-bg-transparent! gl-flex-shrink-0"
/>
@@ -127,9 +130,6 @@ export default {
class="gl-shadow-none! gl-bg-transparent! gl-flex-shrink-0 gl-ml-3"
/>
</div>
- <p>
- <b> {{ $options.i18n.step4 }}</b> {{ $options.i18n.step4Text }}
- </p>
<template #modal-footer>
<gl-button @click="hide" @keydown.esc="hide">{{ $options.i18n.close }}</gl-button>
</template>
diff --git a/app/assets/javascripts/super_sidebar/components/super_sidebar.vue b/app/assets/javascripts/super_sidebar/components/super_sidebar.vue
index 2a95d2c37c4..e9198952382 100644
--- a/app/assets/javascripts/super_sidebar/components/super_sidebar.vue
+++ b/app/assets/javascripts/super_sidebar/components/super_sidebar.vue
@@ -78,10 +78,12 @@ export default {
<context-switcher-toggle
:context="sidebarData.current_context_header"
:expanded="contextSwitcherOpen"
+ data-qa-selector="context_switcher"
/>
<gl-collapse
id="context-switcher"
v-model="contextSwitcherOpen"
+ data-qa-selector="context_section"
@shown="onContextSwitcherShown"
>
<context-switcher
diff --git a/app/controllers/admin/plan_limits_controller.rb b/app/controllers/admin/plan_limits_controller.rb
index 886b08b149e..ea52198432c 100644
--- a/app/controllers/admin/plan_limits_controller.rb
+++ b/app/controllers/admin/plan_limits_controller.rb
@@ -51,5 +51,3 @@ class Admin::PlanLimitsController < Admin::ApplicationController
])
end
end
-
-Admin::PlanLimitsController.prepend_mod_with('Admin::PlanLimitsController')
diff --git a/app/finders/fork_targets_finder.rb b/app/finders/fork_targets_finder.rb
index c1769ea28f9..a96acd5838e 100644
--- a/app/finders/fork_targets_finder.rb
+++ b/app/finders/fork_targets_finder.rb
@@ -24,7 +24,7 @@ class ForkTargetsFinder
def fork_targets(options)
if options[:only_groups]
- user.manageable_groups(include_groups_with_developer_maintainer_access: true)
+ Groups::AcceptingProjectCreationsFinder.new(user).execute # rubocop: disable CodeReuse/Finder
else
user.forkable_namespaces.sort_by_type
end
diff --git a/app/models/user.rb b/app/models/user.rb
index b26ce449d9e..96223ac5027 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1717,10 +1717,11 @@ class User < ApplicationRecord
def forkable_namespaces
strong_memoize(:forkable_namespaces) do
personal_namespace = Namespace.where(id: namespace_id)
+ groups_allowing_project_creation = Groups::AcceptingProjectCreationsFinder.new(self).execute
Namespace.from_union(
[
- manageable_groups(include_groups_with_developer_maintainer_access: true),
+ groups_allowing_project_creation,
personal_namespace
])
end