Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-11-17 18:11:16 +00:00
parent 4e752429e6
commit b9b3924a96
18 changed files with 57 additions and 36 deletions

View File

@ -82,19 +82,6 @@
<<: *node-modules-cache
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
.assets-cache: &assets-cache
key: "assets-debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}-node-${NODE_ENV}-v5"
# This list should match GITLAB_ASSETS_PATHS_LIST from scripts/gitlab_component_helpers.sh
paths:
- cached-assets-hash.txt
- app/assets/javascripts/locale/**/app.js
- public/assets/
policy: pull
.assets-cache-push: &assets-cache-push
<<: *assets-cache
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
.assets-tmp-cache: &assets-tmp-cache
key: "assets-tmp-debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}-node-${NODE_ENV}-v1"
paths:

View File

@ -76,7 +76,9 @@ export default {
this.$refs.modal.show();
},
submitForm() {
this.$refs.form.submit();
if (!this.deleteButtonDisabled) {
this.$refs.form.submit();
}
},
closeModal() {
this.$refs.modal.hide();
@ -127,7 +129,7 @@ export default {
</div>
</gl-alert>
<form ref="form" :action="deletePath" method="post">
<form ref="form" :action="deletePath" method="post" @submit.prevent>
<div v-if="isProtectedBranch" class="gl-mt-4">
<p>
<gl-sprintf :message="undoneWarning">
@ -150,6 +152,7 @@ export default {
class="gl-mt-4"
aria-labelledby="input-label"
autocomplete="off"
@keyup.enter="submitForm"
/>
</p>
</div>

View File

@ -31,6 +31,10 @@ export default {
type: String,
required: true,
},
fullPath: {
type: String,
required: true,
},
accessLevels: {
type: Object,
required: true,
@ -155,6 +159,7 @@ export default {
:root-group-id="rootId"
:invalid-feedback-message="invalidFeedbackMessage"
:is-loading="isLoading"
:full-path="fullPath"
@reset="resetFields"
@submit="sendInvite"
>

View File

@ -98,6 +98,10 @@ export default {
type: Array,
required: true,
},
fullPath: {
type: String,
required: true,
},
usersLimitDataset: {
type: Object,
required: false,
@ -376,6 +380,7 @@ export default {
:new-users-to-invite="newUsersToInvite"
:root-group-id="rootId"
:users-limit-dataset="usersLimitDataset"
:full-path="fullPath"
@reset="resetFields"
@submit="sendInvite"
@access-level="onAccessLevelUpdate"

View File

@ -205,7 +205,7 @@ export default {
<tr v-for="line in lines" v-once :key="line.line_code" class="line_holder">
<td
:class="line.type"
class="diff-line-num old_line gl-border-bottom-0! gl-border-top-0!"
class="diff-line-num old_line gl-border-bottom-0! gl-border-top-0! gl-border-0! gl-rounded-0!"
>
{{ line.old_line }}
</td>
@ -217,7 +217,7 @@ export default {
</td>
<td
:class="line.type"
class="line_content gl-display-table-cell!"
class="line_content gl-display-table-cell! gl-border-0! gl-rounded-0!"
v-html="line.rich_text /* eslint-disable-line vue/no-v-html */"
></td>
</tr>

View File

@ -29,7 +29,8 @@ module InviteMembersHelper
invalid_groups: source.related_group_ids,
help_link: help_page_url('user/permissions'),
is_project: is_project,
access_levels: member_class.permissible_access_level_roles(current_user, source).to_json
access_levels: member_class.permissible_access_level_roles(current_user, source).to_json,
full_path: source.full_path
}.merge(group_select_data(source))
end
@ -39,7 +40,8 @@ module InviteMembersHelper
id: source.id,
root_id: source.root_ancestor&.id,
name: source.name,
default_access_level: Gitlab::Access::GUEST
default_access_level: Gitlab::Access::GUEST,
full_path: source.full_path
}
if show_invite_members_for_task?(source)

View File

@ -21,8 +21,7 @@
%ul.content-list
= render partial: "table"
- else
= render Pajamas::CardComponent.new(card_options: { class: 'bg-light gl-mt-3 gl-text-center' }) do |c|
- c.body do
= _("No schedules")
.nothing-here-block
= _("No schedules")
#pipeline-take-ownership-modal

View File

@ -54,7 +54,6 @@ This works well for the following reasons:
- `update-qa-cache`, defined in [`.gitlab/ci/qa.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/qa.gitlab-ci.yml).
- `update-assets-compile-production-cache`, defined in [`.gitlab/ci/frontend.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/frontend.gitlab-ci.yml).
- `update-assets-compile-test-cache`, defined in [`.gitlab/ci/frontend.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/frontend.gitlab-ci.yml).
- `update-yarn-cache`, defined in [`.gitlab/ci/frontend.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/frontend.gitlab-ci.yml).
- `update-storybook-yarn-cache`, defined in [`.gitlab/ci/frontend.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/frontend.gitlab-ci.yml).
1. These jobs can also be forced to run in merge requests with the `pipeline:update-cache` label (this can be useful to warm the caches in a MR that updates the cache keys).

View File

@ -63,7 +63,7 @@ You can also submit a short description with the link.
The description shows instead of the URL in the **Linked resources** section of the incident:
```plaintext
/link https://example.link.us/j/123456789, multiple alerts firing
/link https://example.link.us/j/123456789 multiple alerts firing
```
### Link Zoom meetings from an incident **(PREMIUM)**

View File

@ -22,8 +22,10 @@ flexibility:
- Specify a list of users who act as [code owners](../../code_owners.md) for specific files,
and require their approval before work can merge.
You can configure merge request approvals on a per-project basis, and
[on the group level](../../../group/manage.md#group-merge-request-approval-settings). Administrators of
You can configure merge request approvals on a per-project basis, and some approvals can be configured
[on the group level](../../../group/manage.md#group-merge-request-approval-settings). Support for
group-level settings for merge request approval rules is tracked in this
[epic](https://gitlab.com/groups/gitlab-org/-/epics/4367). Administrators of
[GitLab Premium](https://about.gitlab.com/pricing/) and
[GitLab Ultimate](https://about.gitlab.com/pricing/) self-managed GitLab instances
can also configure approvals

View File

@ -2,7 +2,7 @@
source 'https://rubygems.org'
gem 'gitlab-qa', '~> 8', '>= 8.11.0', require: 'gitlab/qa'
gem 'gitlab-qa', '~> 8', '>= 8.12.0', require: 'gitlab/qa'
gem 'activesupport', '~> 6.1.4.7' # This should stay in sync with the root's Gemfile
gem 'allure-rspec', '~> 2.19.0'
gem 'capybara', '~> 3.38.0'

View File

@ -100,7 +100,7 @@ GEM
gitlab (4.18.0)
httparty (~> 0.18)
terminal-table (>= 1.5.1)
gitlab-qa (8.11.0)
gitlab-qa (8.12.0)
activesupport (~> 6.1)
gitlab (~> 4.18.0)
http (~> 5.0)
@ -311,7 +311,7 @@ DEPENDENCIES
faraday-retry (~> 2.0)
fog-core (= 2.1.0)
fog-google (~> 1.19)
gitlab-qa (~> 8, >= 8.11.0)
gitlab-qa (~> 8, >= 8.12.0)
influxdb-client (~> 2.8)
knapsack (~> 4.0)
nokogiri (~> 1.13, >= 1.13.9)

View File

@ -46,6 +46,7 @@ const findDeleteButton = () => wrapper.findByTestId('delete-branch-confirmation-
const findCancelButton = () => wrapper.findByTestId('delete-branch-cancel-button');
const findFormInput = () => wrapper.findComponent(GlFormInput);
const findForm = () => wrapper.find('form');
const submitFormSpy = () => jest.spyOn(wrapper.vm.$refs.form, 'submit');
describe('Delete branch modal', () => {
const expectedUnmergedWarning =
@ -73,12 +74,10 @@ describe('Delete branch modal', () => {
});
it('submits the form when the delete button is clicked', () => {
const submitFormSpy = jest.spyOn(wrapper.vm.$refs.form, 'submit');
findDeleteButton().trigger('click');
expect(findForm().attributes('action')).toBe(deletePath);
expect(submitFormSpy).toHaveBeenCalled();
expect(submitFormSpy()).toHaveBeenCalled();
});
it('calls show on the modal when a `openModal` event is received through the event hub', async () => {
@ -136,7 +135,18 @@ describe('Delete branch modal', () => {
});
});
it('opens with the delete button disabled and enables it when branch name is confirmed', async () => {
it('opens with the delete button disabled and doesn`t fire submit when clicked or pressed enter', async () => {
expect(findDeleteButton().props('disabled')).toBe(true);
findFormInput().vm.$emit('input', 'hello');
await waitForPromises();
findDeleteButton().trigger('click');
expect(submitFormSpy()).not.toHaveBeenCalled();
});
it('opens with the delete button disabled and enables it when branch name is confirmed and fires submit', async () => {
expect(findDeleteButton().props('disabled')).toBe(true);
findFormInput().vm.$emit('input', branchName);
@ -144,6 +154,9 @@ describe('Delete branch modal', () => {
await waitForPromises();
expect(findDeleteButton().props('disabled')).not.toBe(true);
findDeleteButton().trigger('click');
expect(submitFormSpy()).toHaveBeenCalled();
});
});

View File

@ -57,6 +57,7 @@ describe('InviteMembersModal', () => {
},
propsData: {
usersLimitDataset: {},
fullPath: 'project',
...propsData,
...props,
},

View File

@ -7,6 +7,7 @@ export const propsData = {
accessLevels: { Guest: 10, Reporter: 20, Developer: 30, Maintainer: 40, Owner: 50 },
defaultAccessLevel: 10,
helpLink: 'https://example.com',
fullPath: 'project',
};
export const sharedGroup = { id: '981' };

View File

@ -17,7 +17,7 @@ RSpec.describe HamlLint::Linter::DocumentationLinks do
end
context 'when link_to points to the existing file with valid anchor' do
let(:haml) { "= link_to 'Description', #{link_pattern}('index.md', anchor: 'overview'), target: '_blank'" }
let(:haml) { "= link_to 'Description', #{link_pattern}('index.md', anchor: 'user-account'), target: '_blank'" }
it { is_expected.not_to report_lint }
end

View File

@ -21,7 +21,8 @@ RSpec.describe InviteMembersHelper do
invalid_groups: project.related_group_ids,
help_link: help_page_url('user/permissions'),
is_project: 'true',
access_levels: ProjectMember.access_level_roles.to_json
access_levels: ProjectMember.access_level_roles.to_json,
full_path: project.full_path
}
expect(helper.common_invite_group_modal_data(project, ProjectMember, 'true')).to include(attributes)
@ -56,7 +57,8 @@ RSpec.describe InviteMembersHelper do
id: project.id,
root_id: project.root_ancestor.id,
name: project.name,
default_access_level: Gitlab::Access::GUEST
default_access_level: Gitlab::Access::GUEST,
full_path: project.full_path
}
expect(helper.common_invite_modal_dataset(project)).to include(attributes)

View File

@ -14,6 +14,8 @@ module Spec
submit_invites
end
wait_for_all_requests
page.refresh if refresh
end