Commit 515ec7e2 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 58f7c60f ae1f26b6
......@@ -623,20 +623,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- ee/spec/services/dast_scanner_profiles/update_service_spec.rb
- ee/spec/services/dast_site_profiles/destroy_service_spec.rb
- ee/spec/services/dora/aggregate_metrics_service_spec.rb
- ee/spec/services/ee/audit_events/protected_branch_audit_event_service_spec.rb
- ee/spec/services/ee/ci/change_variable_service_spec.rb
- ee/spec/services/ee/ci/change_variables_service_spec.rb
- ee/spec/services/ee/design_management/delete_designs_service_spec.rb
- ee/spec/services/ee/git/branch_push_service_spec.rb
- ee/spec/services/ee/issuable/bulk_update_service_spec.rb
- ee/spec/services/ee/issues/create_service_spec.rb
- ee/spec/services/ee/issues/update_service_spec.rb
- ee/spec/services/ee/labels/create_service_spec.rb
- ee/spec/services/ee/merge_requests/base_service_spec.rb
- ee/spec/services/ee/notes/create_service_spec.rb
- ee/spec/services/ee/notification_service_spec.rb
- ee/spec/services/ee/resource_events/merge_into_notes_service_spec.rb
- ee/spec/services/ee/todos/destroy/entity_leave_service_spec.rb
- ee/spec/services/external_approval_rules/create_service_spec.rb
- ee/spec/services/external_approval_rules/destroy_service_spec.rb
- ee/spec/services/external_approval_rules/update_service_spec.rb
......@@ -832,9 +818,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- spec/lib/gitlab/alert_management/payload/managed_prometheus_spec.rb
- spec/lib/gitlab/alert_management/payload/prometheus_spec.rb
- spec/lib/gitlab/alert_management/payload_spec.rb
- spec/lib/gitlab/analytics/cycle_analytics/base_query_builder_spec.rb
- spec/lib/gitlab/analytics/cycle_analytics/median_spec.rb
- spec/lib/gitlab/analytics/cycle_analytics/records_fetcher_spec.rb
- spec/lib/gitlab/auth/otp/strategies/devise_spec.rb
- spec/lib/gitlab/auth/otp/strategies/forti_authenticator_spec.rb
- spec/lib/gitlab/auth/otp/strategies/forti_token_cloud_spec.rb
......
......@@ -9,6 +9,10 @@
= f.label :pages_https_only, class: pages_https_only_label_class do
%strong
= s_('GitLabPages|Force HTTPS (requires valid certificates)')
- docs_link_start = "<a href='#{help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index', anchor: 'force-https-for-gitlab-pages-websites')}' target='_blank' rel='noopener noreferrer'>".html_safe
- link_end = '</a>'.html_safe
%p
= s_("GitLabPages|When enabled, all attempts to visit your website through HTTP are automatically redirected to HTTPS using a response with status code 301. Requires a valid certificate for all domains. %{docs_link_start}Learn more.%{link_end}").html_safe % { docs_link_start: docs_link_start, link_end: link_end }
.gl-mt-3
= f.submit s_('GitLabPages|Save'), class: 'btn btn-confirm gl-button'
.gl-mt-3
= f.submit s_('GitLabPages|Save'), class: 'btn btn-confirm gl-button'
......@@ -2,6 +2,5 @@
= sprite_icon("warning-solid", css_class: "gl-text-orange-600")
%strong= _("Warning:")
- pages_host = Gitlab.config.pages.host
= s_("GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with sub-subdomains. This means that if your username/groupname contains a dot it will not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages will continue to work provided you don't redirect HTTP to HTTPS.").html_safe % { pages_host: pages_host }
%strong= external_link(s_("GitLabPages|Learn more."), "https://docs.gitlab.com/ee/user/project/pages/introduction.html#limitations")
- docs_link_start = "<a href='#{help_page_path('user/project/pages/introduction', anchor: 'limitations')}' target='_blank' rel='noopener noreferrer'>".html_safe
= s_("GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with sub-subdomains. This means that if your username/groupname contains a dot it will not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages will continue to work provided you don't redirect HTTP to HTTPS. %{docs_link_start}Learn more.%{link_end}").html_safe % { pages_host: pages_host, docs_link_start: docs_link_start, link_end: link_end }
......@@ -4,8 +4,7 @@
= s_('GitLabPages|Configure pages')
.card-body
%p.gl-mb-0
- docs_link_start = "<a href='#{help_page_path('user/project/pages/index.md')}' target='_blank' rel='noopener noreferrer'>".html_safe
- docs_link_start = "<a href='#{help_page_path('user/project/pages/index')}' target='_blank' rel='noopener noreferrer'>".html_safe
- samples_link_start = "<a href='https://gitlab.com/pages' target='_blank' rel='noopener noreferrer'>".html_safe
- templates_link_start = "<a href='https://gitlab.com/gitlab-org/project-templates' target='_blank' rel='noopener noreferrer'>".html_safe
- link_end = '</a>'.html_safe
= s_('GitLabPages|See the %{docs_link_start}GitLab Pages documentation%{link_end} to learn how to upload your static site and have GitLab serve it. You can also follow a %{samples_link_start}sample project%{link_end} or use a %{templates_link_start}GitLab CI template%{link_end}.').html_safe % { docs_link_start: docs_link_start, samples_link_start: samples_link_start, templates_link_start: templates_link_start, link_end: link_end }
= s_('GitLabPages|Your Pages site is not configured yet. See the %{docs_link_start}GitLab Pages documentation%{link_end} to learn how to upload your static site and have GitLab serve it. You can also take some inspiration from the %{samples_link_start}sample Pages projects%{link_end}.').html_safe % { docs_link_start: docs_link_start, samples_link_start: samples_link_start, link_end: link_end }
......@@ -9,7 +9,9 @@
= s_('GitLabPages|New Domain')
%p.light
= s_('GitLabPages|With GitLab Pages you can host your static websites on GitLab. Combined with the power of GitLab CI and the help of GitLab Runner you can deploy static pages for your individual projects, your user or your group.')
- docs_link_start = "<a href='#{help_page_path('user/project/pages/index')}' target='_blank' rel='noopener noreferrer'>".html_safe
- link_end = '</a>'.html_safe
= s_('GitLabPages|With GitLab Pages you can host your static website directly from your GitLab repository. %{docs_link_start}Learn more.%{link_end}').html_safe % { docs_link_start: docs_link_start, link_end: link_end }
= render 'pages_settings'
......
---
title: Review and revise Pages settings-related UI text
merge_request: 58479
author:
type: other
---
title: Add correlation id in X-Request-ID for external pipeline validation
merge_request: 58741
author:
type: other
---
title: Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/gitlab/analytics
merge_request: 58245
author: Huzaifa Iftikhar @huzaifaiftikhar
type: fixed
......@@ -38,10 +38,14 @@ export default {
preventMrApprovalRuleEditDocsAnchor: 'editing--overriding-approval-rules-per-merge-request',
requireUserPasswordDocsAnchor: 'require-authentication-when-approving-a-merge-request',
removeApprovalsOnPushDocsAnchor: 'resetting-approvals-on-push',
preventCommittersApprovalAnchor: 'prevent-approval-of-merge-requests-by-their-committers',
},
i18n: {
authorApprovalLabel: __('Prevent MR approvals by the author.'),
preventMrApprovalRuleEditLabel: __('Prevent users from modifying MR approval rules.'),
preventCommittersApprovalLabel: __(
'Prevent approval of merge requests by merge request committers.',
),
requireUserPasswordLabel: __('Require user password for approvals.'),
removeApprovalsOnPushLabel: __(
'Remove all approvals in a merge request when new commits are pushed to its source branch.',
......@@ -78,6 +82,12 @@ export default {
:anchor="$options.links.removeApprovalsOnPushDocsAnchor"
data-testid="remove-approvals-on-push"
/>
<approval-settings-checkbox
v-model="settings.preventCommittersApproval"
:label="$options.i18n.preventCommittersApprovalLabel"
:anchor="$options.links.preventCommittersApprovalAnchor"
data-testid="prevent-committers-approval"
/>
</gl-form-group>
<gl-button type="submit" variant="success" category="primary" :disabled="isLoading">
{{ $options.i18n.saveChanges }}
......
......@@ -29,6 +29,7 @@ export const updateSettings = ({ commit, state }, endpoint) => {
allow_overrides_to_approver_list_per_merge_request: !state.settings.preventMrApprovalRuleEdit,
require_password_to_approve: state.settings.requireUserPassword,
retain_approvals_on_push: !state.settings.removeApprovalsOnPush,
allow_committer_approval: !state.settings.preventCommittersApproval,
};
commit(types.REQUEST_UPDATE_SETTINGS);
......
......@@ -9,6 +9,7 @@ export default {
state.settings.preventMrApprovalRuleEdit = !data.allow_overrides_to_approver_list_per_merge_request;
state.settings.requireUserPassword = data.require_password_to_approve;
state.settings.removeApprovalsOnPush = !data.retain_approvals_on_push;
state.settings.preventCommittersApproval = !data.allow_committer_approval;
state.isLoading = false;
},
[types.RECEIVE_SETTINGS_ERROR](state) {
......@@ -22,6 +23,7 @@ export default {
state.settings.preventMrApprovalRuleEdit = !data.allow_overrides_to_approver_list_per_merge_request;
state.settings.requireUserPassword = data.require_password_to_approve;
state.settings.removeApprovalsOnPush = !data.retain_approvals_on_push;
state.settings.preventCommittersApproval = !data.allow_committer_approval;
state.isLoading = false;
},
[types.UPDATE_SETTINGS_ERROR](state) {
......
---
title: Fix RSpec/EmptyLineAfterFinalLetItBe rubocop offenses in ee/spec/services/ee
merge_request: 58351
author: Abdul Wadood @abdulwd
type: fixed
......@@ -52,6 +52,7 @@ describe('ApprovalSettings', () => {
describe.each`
testid | setting | label | anchor
${'prevent-author-approval'} | ${'preventAuthorApproval'} | ${'Prevent MR approvals by the author.'} | ${'allowing-merge-request-authors-to-approve-their-own-merge-requests'}
${'prevent-committers-approval'} | ${'preventCommittersApproval'} | ${'Prevent approval of merge requests by merge request committers.'} | ${'prevent-approval-of-merge-requests-by-their-committers'}
${'prevent-mr-approval-rule-edit'} | ${'preventMrApprovalRuleEdit'} | ${'Prevent users from modifying MR approval rules.'} | ${'editing--overriding-approval-rules-per-merge-request'}
${'require-user-password'} | ${'requireUserPassword'} | ${'Require user password for approvals.'} | ${'require-authentication-when-approving-a-merge-request'}
${'remove-approvals-on-push'} | ${'removeApprovalsOnPush'} | ${'Remove all approvals in a merge request when new commits are pushed to its source branch.'} | ${'resetting-approvals-on-push'}
......
......@@ -74,6 +74,7 @@ describe('EE approvals group settings module actions', () => {
state = {
settings: {
preventAuthorApproval: false,
preventCommittersApproval: false,
preventMrApprovalRuleEdit: false,
requireUserPassword: false,
removeApprovalsOnPush: false,
......@@ -85,6 +86,7 @@ describe('EE approvals group settings module actions', () => {
it('dispatches the request and updates payload', () => {
const data = {
allow_author_approval: true,
allow_committer_approval: true,
allow_overrides_to_approver_list_per_merge_request: true,
require_password_to_approve: true,
retain_approvals_on_push: true,
......
......@@ -20,12 +20,14 @@ describe('Group settings store mutations', () => {
it('updates settings', () => {
mutations.RECEIVE_SETTINGS_SUCCESS(state, {
allow_author_approval: true,
allow_committer_approval: true,
allow_overrides_to_approver_list_per_merge_request: true,
require_password_to_approve: true,
retain_approvals_on_push: true,
});
expect(state.settings.preventAuthorApproval).toBe(false);
expect(state.settings.preventCommittersApproval).toBe(false);
expect(state.settings.preventMrApprovalRuleEdit).toBe(false);
expect(state.settings.requireUserPassword).toBe(true);
expect(state.settings.removeApprovalsOnPush).toBe(false);
......
......@@ -8,6 +8,7 @@ RSpec.describe EE::AuditEvents::ProtectedBranchAuditEventService, :request_store
let_it_be(:author) { create(:user, :with_sign_ins) }
let_it_be(:entity) { create(:project, creator: author) }
let_it_be(:protected_branch) { create(:protected_branch, :no_one_can_push, project: entity) }
let(:logger) { instance_spy(Gitlab::AuditJsonLogger) }
let(:ip_address) { '192.168.15.18' }
......
......@@ -6,6 +6,7 @@ RSpec.describe Ci::ChangeVariableService do
subject(:execute) { service.execute }
let_it_be(:user) { create(:user) }
let(:group) { create(:group) }
let(:audit_service_spy) { class_spy(::Ci::AuditVariableChangeService, new: spy) }
......
......@@ -6,6 +6,7 @@ RSpec.describe Ci::ChangeVariablesService do
subject(:execute) { service.execute }
let_it_be(:user) { create(:user) }
let(:group) { create(:group) }
let(:audit_service_spy) { class_spy(Ci::AuditVariableChangeService, new: spy) }
......
......@@ -8,6 +8,7 @@ RSpec.describe DesignManagement::DeleteDesignsService do
let_it_be(:issue) { create(:issue, project: project) }
let_it_be(:user) { create(:user) }
let_it_be(:design_repository) { ::Gitlab::GlRepository::DESIGN.repository_resolver.call(project)}
let!(:design) { create(:design, :with_lfs_file, issue: issue) }
subject { described_class.new(project, user, issue: issue, designs: [design]) }
......
......@@ -6,6 +6,7 @@ RSpec.describe Git::BranchPushService do
include RepoHelpers
let_it_be(:user) { create(:user) }
let(:blankrev) { Gitlab::Git::BLANK_SHA }
let(:oldrev) { sample_commit.parent_id }
let(:newrev) { sample_commit.id }
......
......@@ -31,6 +31,7 @@ RSpec.describe Issuable::BulkUpdateService do
context 'with issues' do
let_it_be(:type) { 'issue' }
let_it_be(:parent) { group }
let(:issue1) { create(:issue, project: project1, health_status: :at_risk) }
let(:issue2) { create(:issue, project: project2, health_status: :at_risk) }
let(:issuables) { [issue1, issue2] }
......
......@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Issues::CreateService do
let_it_be(:group) { create(:group) }
let(:project) { create(:project, group: group) }
let(:user) { create(:user) }
let(:params) { { title: 'Awesome issue', description: 'please fix', weight: 9 } }
......
......@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Issues::UpdateService do
let_it_be(:group) { create(:group) }
let(:project) { create(:project, group: group) }
let(:issue) { create(:issue, project: project) }
let(:user) { issue.author }
......@@ -19,6 +20,7 @@ RSpec.describe Issues::UpdateService do
context 'refresh epic dates' do
let_it_be(:epic) { create(:epic) }
let(:issue) { create(:issue, epic: epic, project: project) }
context 'updating milestone' do
......
......@@ -6,6 +6,7 @@ RSpec.describe Labels::CreateService do
describe '#execute' do
let_it_be(:project) { create(:project) }
let_it_be(:namespace) { create(:group) }
let(:params) do
{
title: title,
......
......@@ -6,6 +6,7 @@ RSpec.describe MergeRequests::BaseService do
include ProjectForksHelper
let_it_be(:project) { create(:project, :repository) }
let(:title) { 'Awesome merge_request' }
let(:params) do
{
......
......@@ -63,6 +63,7 @@ RSpec.describe Notes::CreateService do
context 'for epics' do
let_it_be(:epic) { create(:epic) }
let(:opts) { { noteable_type: 'Epic', noteable_id: epic.id, note: "hello" } }
it 'tracks epic note creation' do
......
......@@ -231,6 +231,7 @@ RSpec.describe EE::NotificationService, :mailer do
describe 'mirror was disabled' do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
let(:deleted_username) { 'deleted_user_name' }
context 'when the project has invited members' do
......
......@@ -26,6 +26,7 @@ RSpec.describe ResourceEvents::MergeIntoNotesService do
let_it_be(:scoped_label_group2_1) { create(:label, project: project, title: 'key2::value') }
let_it_be(:scoped_label_group2_2) { create(:label, project: project, title: 'key2::value2') }
let_it_be(:scoped_label_group3_1) { create(:label, project: project, title: 'key3::value') }
let(:time) { Time.current }
describe '#execute' do
......
......@@ -9,6 +9,7 @@ RSpec.describe Todos::Destroy::EntityLeaveService do
let_it_be(:epic1) { create(:epic, confidential: true, group: subgroup) }
let_it_be(:epic2) { create(:epic, group: subgroup) }
let!(:todo1) { create(:todo, target: epic1, user: user, group: subgroup) }
let!(:todo2) { create(:todo, target: epic2, user: user, group: subgroup) }
......
......@@ -69,8 +69,10 @@ module Gitlab
end
def validate_service_request
headers = {}
headers['X-Gitlab-Token'] = validation_service_token if validation_service_token
headers = {
'X-Request-ID' => Labkit::Correlation::CorrelationId.current_id,
'X-Gitlab-Token' => validation_service_token
}.compact
Gitlab::HTTP.post(
validation_service_url, timeout: validation_service_timeout,
......
......@@ -14531,9 +14531,6 @@ msgstr ""
msgid "GitLabPages|It may take up to 30 minutes before the site is available after the first deployment."
msgstr ""
msgid "GitLabPages|Learn more."
msgstr ""
msgid "GitLabPages|Maximum size of pages (MB)"
msgstr ""
......@@ -14558,9 +14555,6 @@ msgstr ""
msgid "GitLabPages|Save"
msgstr ""
msgid "GitLabPages|See the %{docs_link_start}GitLab Pages documentation%{link_end} to learn how to upload your static site and have GitLab serve it. You can also follow a %{samples_link_start}sample project%{link_end} or use a %{templates_link_start}GitLab CI template%{link_end}."
msgstr ""
msgid "GitLabPages|Something went wrong while obtaining the Let's Encrypt certificate for %{domain}. To retry visit your %{link_start}domain details%{link_end}."
msgstr ""
......@@ -14576,10 +14570,16 @@ msgstr ""
msgid "GitLabPages|Verified"
msgstr ""
msgid "GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with sub-subdomains. This means that if your username/groupname contains a dot it will not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages will continue to work provided you don't redirect HTTP to HTTPS."
msgid "GitLabPages|When enabled, all attempts to visit your website through HTTP are automatically redirected to HTTPS using a response with status code 301. Requires a valid certificate for all domains. %{docs_link_start}Learn more.%{link_end}"
msgstr ""
msgid "GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with sub-subdomains. This means that if your username/groupname contains a dot it will not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages will continue to work provided you don't redirect HTTP to HTTPS. %{docs_link_start}Learn more.%{link_end}"
msgstr ""
msgid "GitLabPages|With GitLab Pages you can host your static website directly from your GitLab repository. %{docs_link_start}Learn more.%{link_end}"
msgstr ""
msgid "GitLabPages|With GitLab Pages you can host your static websites on GitLab. Combined with the power of GitLab CI and the help of GitLab Runner you can deploy static pages for your individual projects, your user or your group."
msgid "GitLabPages|Your Pages site is not configured yet. See the %{docs_link_start}GitLab Pages documentation%{link_end} to learn how to upload your static site and have GitLab serve it. You can also take some inspiration from the %{samples_link_start}sample Pages projects%{link_end}."
msgstr ""
msgid "GitLabPages|Your pages are served under:"
......@@ -23525,6 +23525,9 @@ msgstr ""
msgid "Prevent adding new members to project membership within this group"
msgstr ""
msgid "Prevent approval of merge requests by merge request committers."
msgstr ""
msgid "Prevent environment from auto-stopping"
msgstr ""
......
......@@ -175,7 +175,6 @@ RSpec.describe 'Pages edits pages settings', :js do
expect(page).not_to have_field(:project_pages_https_only)
expect(page).not_to have_content('Force HTTPS (requires valid certificates)')
expect(page).to have_button('Save')
end
end
end
......
......@@ -73,6 +73,6 @@ RSpec.describe 'User searches project settings', :js do
visit project_pages_path(project)
end
it_behaves_like 'can highlight results', 'static websites'
it_behaves_like 'can highlight results', 'static website'
end
end
......@@ -7,6 +7,7 @@ RSpec.describe Gitlab::Analytics::CycleAnalytics::BaseQueryBuilder do
let_it_be(:mr1) { create(:merge_request, target_project: project, source_project: project, allow_broken: true, created_at: 3.months.ago) }
let_it_be(:mr2) { create(:merge_request, target_project: project, source_project: project, allow_broken: true, created_at: 1.month.ago) }
let_it_be(:user) { create(:user) }
let(:params) { { current_user: user } }
let(:records) do
stage = build(:cycle_analytics_project_stage, {
......
......@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Analytics::CycleAnalytics::Median do
let_it_be(:project) { create(:project, :repository) }
let(:query) { Project.joins(merge_requests: :metrics) }
let(:stage) do
......
......@@ -34,6 +34,7 @@ RSpec.describe Gitlab::Analytics::CycleAnalytics::RecordsFetcher do
describe 'for issue based stage' do
let_it_be(:issue1) { create(:issue, project: project) }
let_it_be(:issue2) { create(:issue, project: project, confidential: true) }
let(:stage) do
build(:cycle_analytics_project_stage, {
start_event_identifier: :plan_stage_start,
......
......@@ -57,13 +57,14 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Validate::External do
before do
stub_env('EXTERNAL_VALIDATION_SERVICE_URL', validation_service_url)
allow(Gitlab).to receive(:com?).and_return(dot_com)
allow(Labkit::Correlation::CorrelationId).to receive(:current_id).and_return('correlation-id')
end
it 'respects the defined payload schema' do
expect(::Gitlab::HTTP).to receive(:post) do |_url, params|
expect(params[:body]).to match_schema('/external_validation')
expect(params[:timeout]).to eq(described_class::DEFAULT_VALIDATION_REQUEST_TIMEOUT)
expect(params[:headers]).to eq({})
expect(params[:headers]).to eq({ 'X-Request-ID' => 'correlation-id' })
end
perform!
......@@ -127,7 +128,7 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Validate::External do
it 'passes token in X-Gitlab-Token header' do
expect(::Gitlab::HTTP).to receive(:post) do |_url, params|
expect(params[:headers]).to eq({ 'X-Gitlab-Token' => '123' })
expect(params[:headers]).to include({ 'X-Gitlab-Token' => '123' })
end
perform!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment