Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-03-05 03:08:54 +00:00
parent 7ff2de7c12
commit 4b4d338d32
14 changed files with 88 additions and 14 deletions

View file

@ -25,4 +25,4 @@
= _("Explain the problem. If appropriate, provide a link to the relevant issue or comment.")
.form-actions
= f.submit _("Send report"), class: "gl-button btn btn-success"
= f.submit _("Send report"), class: "gl-button btn btn-confirm"

View file

@ -87,8 +87,8 @@
.form-actions
- if @user.new_record?
= f.submit 'Create user', class: "btn gl-button btn-success"
= link_to 'Cancel', admin_users_path, class: "gl-button btn btn-cancel"
= f.submit 'Create user', class: "btn gl-button btn-confirm"
= link_to 'Cancel', admin_users_path, class: "gl-button btn btn-default btn-cancel"
- else
= f.submit 'Save changes', class: "btn gl-button btn-success"
= link_to 'Cancel', admin_user_path(@user), class: "btn gl-button btn-cancel"
= f.submit 'Save changes', class: "btn gl-button btn-confirm"
= link_to 'Cancel', admin_user_path(@user), class: "gl-button btn btn-default btn-cancel"

View file

@ -43,7 +43,7 @@
.nav-controls
= render_if_exists 'admin/users/admin_email_users'
= render_if_exists 'admin/users/admin_export_user_permissions'
= link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn gl-button btn-success btn-search float-right'
= link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn gl-button btn-confirm btn-search float-right'
.filtered-search-block.row-content-block.border-top-0
= form_tag admin_users_path, method: :get do

View file

@ -6,3 +6,4 @@ Merge Request URL: #{project_merge_request_url(@merge_request.target_project, @m
Author: #{sanitize_name(@merge_request.author_name)}
= assignees_label(@merge_request)
= reviewers_label(@merge_request)

View file

@ -0,0 +1,5 @@
---
title: Add reviewers detail to text version of closed merge request email
merge_request: 55594
author:
type: added

View file

@ -0,0 +1,5 @@
---
title: Move to btn-confirm from btn-success in abuse_reports folder
merge_request: 55262
author: Yogi (@yo)
type: changed

View file

@ -0,0 +1,5 @@
---
title: Move to btn-confirm from btn-success in admin/users directory
merge_request: 55276
author: Yogi (@yo)
type: changed

View file

@ -0,0 +1,5 @@
---
title: 'checks: Skip LFS checks when deleting refs'
merge_request: 55609
author:
type: fixed

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View file

@ -126,6 +126,11 @@ The following list depicts the network architecture of Gitaly:
- Authentication is done through a static token which is shared among the Gitaly and GitLab Rails
nodes.
The following digraph illustrates communication between Gitaly servers and GitLab Rails showing
the default ports for HTTP and HTTPs communication.
![Gitaly network architecture diagram](img/gitaly_network_13_9.png)
WARNING:
Gitaly servers must not be exposed to the public internet as Gitaly's network traffic is unencrypted
by default. The use of firewall is highly recommended to restrict access to the Gitaly server.

View file

@ -74,7 +74,8 @@ the **Failed jobs** tab of the pipeline page.
## Export vulnerabilities
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213014) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.10.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213014) in the Security Center (previously known as the Instance Security Dashboard) and project-level Vulnerability Report (previously known as the Project Security Dashboard) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.0.
> - [Added](https://gitlab.com/gitlab-org/gitlab/-/issues/213013) to the group-level Vulnerability Report in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.1.
You can export all your vulnerabilities in CSV (comma separated values) format by clicking the
**{upload}** **Export** button located at top right of the Security Dashboard. When the report is

View file

@ -13,6 +13,7 @@ module Gitlab
return unless project.lfs_enabled?
return if skip_lfs_integrity_check
return if deletion?
logger.log_timed(LOG_MESSAGE) do
lfs_check = Checks::LfsIntegrity.new(project, newrev, logger.time_left)

View file

@ -39,13 +39,26 @@ RSpec.describe Gitlab::Checks::LfsCheck do
end
end
context 'deletion' do
let(:changes) { { oldrev: oldrev, ref: ref } }
context 'with deletion' do
shared_examples 'a skipped integrity check' do
it 'skips integrity check' do
expect(project.repository).not_to receive(:new_objects)
expect_any_instance_of(Gitlab::Git::LfsChanges).not_to receive(:new_pointers)
it 'skips integrity check' do
expect(project.repository).not_to receive(:new_objects)
subject.validate!
end
end
subject.validate!
context 'with missing newrev' do
it_behaves_like 'a skipped integrity check' do
let(:changes) { { oldrev: oldrev, ref: ref } }
end
end
context 'with blank newrev' do
it_behaves_like 'a skipped integrity check' do
let(:changes) { { oldrev: oldrev, newrev: Gitlab::Git::BLANK_SHA, ref: ref } }
end
end
end

View file

@ -8,7 +8,7 @@ RSpec.describe Emails::MergeRequests do
include_context 'gitlab email notification'
let_it_be(:current_user) { create(:user) }
let_it_be(:current_user, reload: true) { create(:user, email: "current@email.com", name: 'www.example.com') }
let_it_be(:assignee, reload: true) { create(:user, email: 'assignee@example.com', name: 'John Doe') }
let_it_be(:reviewer, reload: true) { create(:user, email: 'reviewer@example.com', name: 'Jane Doe') }
let_it_be(:project) { create(:project, :repository) }
@ -22,6 +22,39 @@ RSpec.describe Emails::MergeRequests do
end
let(:recipient) { assignee }
let(:current_user_sanitized) { 'www_example_com' }
describe '#closed_merge_request_email' do
subject { Notify.closed_merge_request_email(recipient.id, merge_request.id, current_user.id) }
it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do
let(:model) { merge_request }
end
it_behaves_like 'it should show Gmail Actions View Merge request link'
it_behaves_like 'an unsubscribeable thread'
it_behaves_like 'appearance header and footer enabled'
it_behaves_like 'appearance header and footer not enabled'
it 'is sent as the author' do
sender = subject.header[:from].addrs[0]
expect(sender.display_name).to eq(current_user.name)
expect(sender.address).to eq(gitlab_sender)
end
it 'has the correct subject and body' do
aggregate_failures do
is_expected.to have_referable_subject(merge_request, reply: true)
is_expected.to have_body_text('closed')
is_expected.to have_body_text(current_user_sanitized)
is_expected.to have_body_text(project_merge_request_path(project, merge_request))
is_expected.to have_link(merge_request.to_reference, href: project_merge_request_url(merge_request.target_project, merge_request))
expect(subject.text_part).to have_content(assignee.name)
expect(subject.text_part).to have_content(reviewer.name)
end
end
end
describe '#merged_merge_request_email' do
let(:merge_author) { assignee }
@ -79,7 +112,7 @@ RSpec.describe Emails::MergeRequests do
subject { Notify.resolved_all_discussions_email(recipient.id, merge_request.id, current_user.id) }
it "includes the name of the resolver" do
expect(subject).to have_body_text current_user.name
expect(subject).to have_body_text current_user_sanitized
end
end