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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-11-02 12:09:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-02 12:09:38 +0300
commitaa84824d04b32ce9cd3abeac90a6bf78fb2be34c (patch)
tree379dffa10441e382014909ed8a694f1c0c4ec927
parent96100bc70c151404efe5d261813131aaf72b0d41 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.rubocop_todo/capybara/testid_finders.yml2
-rw-r--r--app/controllers/projects_controller.rb2
-rw-r--r--app/mailers/emails/issues.rb2
-rw-r--r--app/mailers/emails/merge_requests.rb2
-rw-r--r--app/services/notification_service.rb4
-rw-r--r--app/views/layouts/_head.html.haml4
-rw-r--r--app/views/layouts/minimal.html.haml7
-rw-r--r--doc/ci/components/index.md33
-rw-r--r--doc/development/api_graphql_styleguide.md6
-rw-r--r--doc/integration/jira/issues.md3
-rw-r--r--spec/features/issues/user_uses_quick_actions_spec.rb6
-rw-r--r--spec/features/nav/top_nav_responsive_spec.rb101
-rw-r--r--spec/features/nav/top_nav_spec.rb51
-rw-r--r--spec/features/nav/top_nav_tooltip_spec.rb25
-rw-r--r--spec/features/unsubscribe_links_spec.rb8
-rw-r--r--spec/features/users/anonymous_sessions_spec.rb8
-rw-r--r--spec/support/rspec_order_todo.yml3
-rw-r--r--spec/support/shared_examples/mailers/notify_shared_examples.rb2
-rw-r--r--spec/views/layouts/snippets.html.haml_spec.rb32
19 files changed, 55 insertions, 246 deletions
diff --git a/.rubocop_todo/capybara/testid_finders.yml b/.rubocop_todo/capybara/testid_finders.yml
index 414a8568e80..d34b645c5d8 100644
--- a/.rubocop_todo/capybara/testid_finders.yml
+++ b/.rubocop_todo/capybara/testid_finders.yml
@@ -96,8 +96,6 @@ Capybara/TestidFinders:
- 'spec/features/nav/new_nav_callout_spec.rb'
- 'spec/features/nav/new_nav_toggle_spec.rb'
- 'spec/features/nav/pinned_nav_items_spec.rb'
- - 'spec/features/nav/top_nav_responsive_spec.rb'
- - 'spec/features/nav/top_nav_spec.rb'
- 'spec/features/populate_new_pipeline_vars_with_params_spec.rb'
- 'spec/features/profile_spec.rb'
- 'spec/features/profiles/account_spec.rb'
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index aee48ecd007..6f15bc553bf 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -43,6 +43,8 @@ class ProjectsController < Projects::ApplicationController
push_frontend_feature_flag(:explain_code_chat, current_user)
push_frontend_feature_flag(:service_desk_custom_email, @project)
push_frontend_feature_flag(:issue_email_participants, @project)
+ # TODO: We need to remove the FF eventually when we rollout page_specific_styles
+ push_frontend_feature_flag(:page_specific_styles, current_user)
push_licensed_feature(:file_locks) if @project.present? && @project.licensed_feature_available?(:file_locks)
push_licensed_feature(:security_orchestration_policies) if @project.present? && @project.licensed_feature_available?(:security_orchestration_policies)
push_force_frontend_feature_flag(:work_items, @project&.work_items_feature_flag_enabled?)
diff --git a/app/mailers/emails/issues.rb b/app/mailers/emails/issues.rb
index 52a16475c07..f859294960c 100644
--- a/app/mailers/emails/issues.rb
+++ b/app/mailers/emails/issues.rb
@@ -70,7 +70,7 @@ module Emails
setup_issue_mail(issue_id, recipient_id)
@label_names = label_names
- @labels_url = project_labels_url(@project)
+ @labels_url = project_labels_url(@project, subscribed: true)
mail_answer_thread(
@issue,
issue_thread_options(
diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb
index cd7869123f3..5e82a3e8dcf 100644
--- a/app/mailers/emails/merge_requests.rb
+++ b/app/mailers/emails/merge_requests.rb
@@ -65,7 +65,7 @@ module Emails
setup_merge_request_mail(merge_request_id, recipient_id)
@label_names = label_names
- @labels_url = project_labels_url(@project)
+ @labels_url = project_labels_url(@project, subscribed: true)
mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, reason))
end
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index f1781b3d3c5..5099272a212 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -358,7 +358,7 @@ class NotificationService
def review_requested_of_merge_request(merge_request, current_user, reviewer)
recipients = NotificationRecipients::BuildService.build_requested_review_recipients(merge_request, current_user, reviewer)
- deliver_option = review_request_deliver_options(merge_request.project, reviewer)
+ deliver_option = review_request_deliver_options(merge_request.project)
recipients.each do |recipient|
mailer
@@ -975,7 +975,7 @@ class NotificationService
{}
end
- def review_request_deliver_options(project, user)
+ def review_request_deliver_options(project)
# Overridden in EE
{}
end
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index 37d03bde72e..41f663c7c06 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -2,10 +2,6 @@
- site_name = _('GitLab')
- omit_og = sign_in_with_redirect?
--# This is a temporary place for the page specific style migrations to be included on all pages like page_specific_files
-- if Feature.disabled?(:page_specific_styles, current_user)
- - add_page_specific_style('page_bundles/projects')
-
%head{ omit_og ? { } : { prefix: "og: http://ogp.me/ns#" } }
%meta{ charset: "utf-8" }
%meta{ 'http-equiv' => 'X-UA-Compatible', content: 'IE=edge' }
diff --git a/app/views/layouts/minimal.html.haml b/app/views/layouts/minimal.html.haml
index 8b6a2a2f2a7..e499b9ae240 100644
--- a/app/views/layouts/minimal.html.haml
+++ b/app/views/layouts/minimal.html.haml
@@ -1,17 +1,18 @@
- page_classes = page_class.push(@html_class).flatten.compact
!!! 5
-%html{ lang: I18n.locale, class: page_classes }
+%html.gl-h-full{ lang: I18n.locale, class: page_classes }
= render "layouts/head"
- %body{ data: body_data, class: system_message_class }
+ %body.gl-h-full{ data: body_data, class: system_message_class }
= header_message
= render 'peek/bar'
= render 'layouts/published_experiments'
= render "layouts/header/empty"
- .layout-page
+ .layout-page.gl-h-full.borderless.gl-display-flex.gl-flex-wrap
.content-wrapper.gl-pt-6{ class: 'gl-md-pt-11!' }
%div{ class: container_class }
%main#content-body.content
= render "layouts/flash" unless @hide_flash
= yield
+ = yield :footer
= footer_message
diff --git a/doc/ci/components/index.md b/doc/ci/components/index.md
index 8246e1c4073..9063b6d0378 100644
--- a/doc/ci/components/index.md
+++ b/doc/ci/components/index.md
@@ -169,19 +169,34 @@ Nesting of components is not possible. For example:
## Release a component
-To create a release for a CI/CD component, use either:
+To create a release for a CI/CD component, use the [`release`](../yaml/index.md#release)
+keyword in a CI/CD pipeline.
-- The [`release`](../yaml/index.md#release) keyword in a CI/CD pipeline. Like in the
- [component testing example](#test-the-component), you can set a component to automatically
- be released after all tests pass in pipelines for new tags.
-- The [UI for creating a release](../../user/project/releases/index.md#create-a-release).
+For example:
+
+```yaml
+create-release:
+ stage: deploy
+ image: registry.gitlab.com/gitlab-org/release-cli:latest
+ rules:
+ - if: $CI_COMMIT_TAG =~ /^v\d+/
+ script: echo "Creating release $CI_COMMIT_TAG"
+ release:
+ tag_name: $CI_COMMIT_TAG
+ description: "Release $CI_COMMIT_TAG of components repository $CI_PROJECT_PATH"
+```
+
+In this example, the job runs only for tags formatted as `v` + version number.
+If all previous jobs succeed, the release is created.
+
+Like in the [component testing example](#test-the-component), you can set a component to automatically
+be released after all tests pass in pipelines for new tags.
-All released versions of the components are displayed in the [CI/CD Catalog](catalog.md)
-page for the given resource, providing users with information about official releases.
+All released versions of the components repositories are displayed in the [CI/CD Catalog](catalog.md),
+providing users with information about official releases.
Components [can be used](#use-a-component-in-a-cicd-configuration) without being released,
-but only with a commit SHA or a branch name. To enable the use of tags or the `~latest` version keyword,
-you must create a release.
+by using the commit SHA or ref. However, the `~latest` version keyword can only be used with released tags.
## Use a component in a CI/CD configuration
diff --git a/doc/development/api_graphql_styleguide.md b/doc/development/api_graphql_styleguide.md
index 3662b21eb9e..bb685c30631 100644
--- a/doc/development/api_graphql_styleguide.md
+++ b/doc/development/api_graphql_styleguide.md
@@ -154,7 +154,11 @@ developers must familiarize themselves with our [Deprecation and Removal process
Breaking changes are:
- Removing or renaming a field, argument, enum value, or mutation.
-- Changing the type of a field, argument or enum value.
+- Changing the type or type name of an argument. This is because the type of an argument
+ is declared by the client when [using variables](https://graphql.org/learn/queries/#variables),
+ and queries with the old type name would be rejected by the API.
+- Changing the _scalar type_ of a field or enum value. Object types can be changed so long as all
+ scalar type fields of the object remain the same.
- Raising the [complexity](#max-complexity) of a field or complexity multipliers in a resolver.
- Changing a field from being _not_ nullable (`null: false`) to nullable (`null: true`), as
discussed in [Nullable fields](#nullable-fields).
diff --git a/doc/integration/jira/issues.md b/doc/integration/jira/issues.md
index ae4b726327c..f6716f49ea5 100644
--- a/doc/integration/jira/issues.md
+++ b/doc/integration/jira/issues.md
@@ -117,6 +117,9 @@ For example, use any of these trigger words to close the Jira issue `PROJECT-1`:
The commit or merge request must target your project's [default branch](../../user/project/repository/branches/default.md).
You can change your project's default branch in [project settings](../../user/project/settings/index.md).
+When your branch name matches the Jira issue ID, `Closes <JIRA-ID>` is automatically appended to your existing merge request template.
+If you do not want to close the issue, [disable automatic issue closing](../../user/project/issues/managing_issues.md#disable-automatic-issue-closing).
+
### Use case for closing issues
Consider this example:
diff --git a/spec/features/issues/user_uses_quick_actions_spec.rb b/spec/features/issues/user_uses_quick_actions_spec.rb
index d3552b87fea..937a0683794 100644
--- a/spec/features/issues/user_uses_quick_actions_spec.rb
+++ b/spec/features/issues/user_uses_quick_actions_spec.rb
@@ -12,8 +12,8 @@ RSpec.describe 'Issues > User uses quick actions', :js, feature_category: :team_
context "issuable common quick actions" do
let(:new_url_opts) { {} }
- let(:maintainer) { create(:user, :no_super_sidebar) }
- let(:project) { create(:project, :public) }
+ let(:maintainer) { create(:user) }
+ let_it_be(:project) { create(:project, :public) }
let!(:label_bug) { create(:label, project: project, title: 'bug') }
let!(:label_feature) { create(:label, project: project, title: 'feature') }
let!(:milestone) { create(:milestone, project: project, title: 'ASAP') }
@@ -25,7 +25,7 @@ RSpec.describe 'Issues > User uses quick actions', :js, feature_category: :team_
end
describe 'issue-only commands' do
- let(:user) { create(:user, :no_super_sidebar) }
+ let(:user) { create(:user) }
let(:project) { create(:project, :public, :repository) }
let(:issue) { create(:issue, project: project, due_date: Date.new(2016, 8, 28)) }
diff --git a/spec/features/nav/top_nav_responsive_spec.rb b/spec/features/nav/top_nav_responsive_spec.rb
deleted file mode 100644
index 2a07742c91e..00000000000
--- a/spec/features/nav/top_nav_responsive_spec.rb
+++ /dev/null
@@ -1,101 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe 'top nav responsive', :js, feature_category: :navigation do
- include MobileHelpers
- include Features::InviteMembersModalHelpers
-
- let_it_be(:user) { create(:user, :no_super_sidebar) }
-
- before do
- sign_in(user)
-
- resize_screen_xs
- end
-
- context 'when outside groups and projects' do
- before do
- visit explore_projects_path
- end
-
- context 'when menu is closed' do
- it 'has page content and hides responsive menu', :aggregate_failures do
- expect(page).to have_css('.page-title', text: 'Explore projects')
- expect(page).to have_link('Homepage', id: 'logo')
-
- expect(page).to have_no_css('.top-nav-responsive')
- end
- end
-
- context 'when menu is opened' do
- before do
- click_button('Menu')
- end
-
- it 'hides everything and shows responsive menu', :aggregate_failures do
- expect(page).to have_no_css('.page-title', text: 'Explore projects')
- expect(page).to have_no_link('Homepage', id: 'logo')
-
- within '.top-nav-responsive' do
- expect(page).to have_link(nil, href: search_path)
- expect(page).to have_button('Projects')
- expect(page).to have_button('Groups')
- expect(page).to have_link('Your work', href: dashboard_projects_path)
- expect(page).to have_link('Explore', href: explore_projects_path)
- end
- end
-
- it 'has new dropdown', :aggregate_failures do
- create_new_button.click
-
- expect(page).to have_link('New project', href: new_project_path)
- expect(page).to have_link('New group', href: new_group_path)
- expect(page).to have_link('New snippet', href: new_snippet_path)
- end
- end
- end
-
- context 'when inside a project' do
- let_it_be(:project) { create(:project).tap { |record| record.add_owner(user) } }
-
- before do
- visit project_path(project)
- end
-
- it 'the add menu contains invite members dropdown option and opens invite modal' do
- invite_members_from_menu
-
- page.within invite_modal_selector do
- expect(page).to have_content("You're inviting members to the #{project.name} project")
- end
- end
- end
-
- context 'when inside a group' do
- let_it_be(:group) { create(:group).tap { |record| record.add_owner(user) } }
-
- before do
- visit group_path(group)
- end
-
- it 'the add menu contains invite members dropdown option and opens invite modal' do
- invite_members_from_menu
-
- page.within invite_modal_selector do
- expect(page).to have_content("You're inviting members to the #{group.name} group")
- end
- end
- end
-
- def invite_members_from_menu
- click_button('Menu')
- create_new_button.click
-
- click_button('Invite members')
- end
-
- def create_new_button
- find('[data-testid="plus-icon"]')
- end
-end
diff --git a/spec/features/nav/top_nav_spec.rb b/spec/features/nav/top_nav_spec.rb
deleted file mode 100644
index bf91897eb26..00000000000
--- a/spec/features/nav/top_nav_spec.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe 'top nav responsive', :js, feature_category: :navigation do
- include Features::InviteMembersModalHelpers
-
- let_it_be(:user) { create(:user, :no_super_sidebar) }
-
- before do
- sign_in(user)
- end
-
- context 'when inside a project' do
- let_it_be(:project) { create(:project).tap { |record| record.add_owner(user) } }
-
- before do
- visit project_path(project)
- end
-
- it 'the add menu contains invite members dropdown option and opens invite modal' do
- invite_members_from_menu
-
- page.within invite_modal_selector do
- expect(page).to have_content("You're inviting members to the #{project.name} project")
- end
- end
- end
-
- context 'when inside a group' do
- let_it_be(:group) { create(:group).tap { |record| record.add_owner(user) } }
-
- before do
- visit group_path(group)
- end
-
- it 'the add menu contains invite members dropdown option and opens invite modal' do
- invite_members_from_menu
-
- page.within invite_modal_selector do
- expect(page).to have_content("You're inviting members to the #{group.name} group")
- end
- end
- end
-
- def invite_members_from_menu
- find('[data-testid="new-menu-toggle"]').click
-
- click_link('Invite members')
- end
-end
diff --git a/spec/features/nav/top_nav_tooltip_spec.rb b/spec/features/nav/top_nav_tooltip_spec.rb
deleted file mode 100644
index 1afd1981a86..00000000000
--- a/spec/features/nav/top_nav_tooltip_spec.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe 'top nav tooltips', :js, feature_category: :navigation do
- let_it_be(:user) { create(:user) }
-
- before do
- sign_in(user)
- visit explore_projects_path
- end
-
- it 'clicking new dropdown hides tooltip', :aggregate_failures,
- quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/382786' do
- btn = '#js-onboarding-new-project-link'
-
- page.find(btn).hover
-
- expect(page).to have_content('Create new...')
-
- page.find(btn).click
-
- expect(page).not_to have_content('Create new...')
- end
-end
diff --git a/spec/features/unsubscribe_links_spec.rb b/spec/features/unsubscribe_links_spec.rb
index b78efa65888..77ef3df97f6 100644
--- a/spec/features/unsubscribe_links_spec.rb
+++ b/spec/features/unsubscribe_links_spec.rb
@@ -6,8 +6,8 @@ RSpec.describe 'Unsubscribe links', :sidekiq_inline, feature_category: :shared d
include Warden::Test::Helpers
let_it_be(:project) { create(:project, :public) }
- let_it_be(:author) { create(:user, :no_super_sidebar).tap { |u| project.add_reporter(u) } }
- let_it_be(:recipient) { create(:user, :no_super_sidebar) }
+ let_it_be(:author) { create(:user).tap { |u| project.add_reporter(u) } }
+ let_it_be(:recipient) { create(:user) }
let(:params) { { title: 'A bug!', description: 'Fix it!', assignee_ids: [recipient.id] } }
let(:issue) { Issues::CreateService.new(container: project, current_user: author, params: params).execute[:issue] }
@@ -22,10 +22,6 @@ RSpec.describe 'Unsubscribe links', :sidekiq_inline, feature_category: :shared d
end
context 'when logged out' do
- before do
- stub_feature_flags(super_sidebar_logged_out: false)
- end
-
context 'when visiting the link from the body' do
it 'shows the unsubscribe confirmation page and redirects to root path when confirming' do
visit body_link
diff --git a/spec/features/users/anonymous_sessions_spec.rb b/spec/features/users/anonymous_sessions_spec.rb
index 368f272ba23..81b18b7ca02 100644
--- a/spec/features/users/anonymous_sessions_spec.rb
+++ b/spec/features/users/anonymous_sessions_spec.rb
@@ -5,6 +5,10 @@ require 'spec_helper'
RSpec.describe 'Session TTLs', :clean_gitlab_redis_shared_state, feature_category: :system_access do
include SessionHelpers
+ before do
+ expire_session
+ end
+
it 'creates a session with a short TTL when login fails' do
visit new_user_session_path
# The session key only gets created after a post
@@ -18,10 +22,10 @@ RSpec.describe 'Session TTLs', :clean_gitlab_redis_shared_state, feature_categor
end
it 'increases the TTL when the login succeeds' do
- user = create(:user, :no_super_sidebar)
+ user = create(:user)
gitlab_sign_in(user)
- expect(page).to have_content(user.name)
+ expect(find('.js-super-sidebar')['data-sidebar']).to include(user.name)
expect_single_session_with_authenticated_ttl
end
diff --git a/spec/support/rspec_order_todo.yml b/spec/support/rspec_order_todo.yml
index 7295a1d8501..9308d49c18a 100644
--- a/spec/support/rspec_order_todo.yml
+++ b/spec/support/rspec_order_todo.yml
@@ -3759,8 +3759,6 @@
- './spec/features/milestones/user_views_milestone_spec.rb'
- './spec/features/milestones/user_views_milestones_spec.rb'
- './spec/features/monitor_sidebar_link_spec.rb'
-- './spec/features/nav/top_nav_responsive_spec.rb'
-- './spec/features/nav/top_nav_tooltip_spec.rb'
- './spec/features/oauth_login_spec.rb'
- './spec/features/oauth_provider_authorize_spec.rb'
- './spec/features/one_trust_spec.rb'
@@ -4109,7 +4107,6 @@
- './spec/features/user_opens_link_to_comment_spec.rb'
- './spec/features/users/active_sessions_spec.rb'
- './spec/features/users/add_email_to_existing_account_spec.rb'
-- './spec/features/users/anonymous_sessions_spec.rb'
- './spec/features/users/bizible_csp_spec.rb'
- './spec/features/users/confirmation_spec.rb'
- './spec/features/user_sees_revert_modal_spec.rb'
diff --git a/spec/support/shared_examples/mailers/notify_shared_examples.rb b/spec/support/shared_examples/mailers/notify_shared_examples.rb
index 987060d73b9..f0d89f6ffaa 100644
--- a/spec/support/shared_examples/mailers/notify_shared_examples.rb
+++ b/spec/support/shared_examples/mailers/notify_shared_examples.rb
@@ -230,6 +230,8 @@ end
RSpec.shared_examples 'an email with a labels subscriptions link in its footer' do
it { is_expected.to have_body_text('label subscriptions') }
+
+ it { is_expected.to have_body_text(%(href="#{project_labels_url(project, subscribed: true)}")) }
end
RSpec.shared_examples 'a note email' do
diff --git a/spec/views/layouts/snippets.html.haml_spec.rb b/spec/views/layouts/snippets.html.haml_spec.rb
deleted file mode 100644
index b7139f84174..00000000000
--- a/spec/views/layouts/snippets.html.haml_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe 'layouts/snippets', feature_category: :source_code_management do
- before do
- allow(view).to receive(:current_user).and_return(user)
- allow(view).to receive(:current_user_mode).and_return(Gitlab::Auth::CurrentUserMode.new(user))
- end
-
- describe 'sidebar' do
- context 'when signed in' do
- let(:user) { build_stubbed(:user, :no_super_sidebar) }
-
- it 'renders the "Your work" sidebar' do
- render
-
- expect(rendered).to have_css('aside.nav-sidebar[aria-label="Your work"]')
- end
- end
-
- context 'when not signed in' do
- let(:user) { nil }
-
- it 'renders no sidebar' do
- render
-
- expect(rendered).not_to have_css('aside.nav-sidebar')
- end
- end
- end
-end