提交 53b1f4ea 编写于 作者: G GitLab Bot

Add latest changes from gitlab-org/gitlab@master

上级 684d6531
...@@ -404,7 +404,6 @@ RSpec/RepeatedExample: ...@@ -404,7 +404,6 @@ RSpec/RepeatedExample:
- 'spec/lib/gitlab/closing_issue_extractor_spec.rb' - 'spec/lib/gitlab/closing_issue_extractor_spec.rb'
- 'spec/lib/gitlab/danger/changelog_spec.rb' - 'spec/lib/gitlab/danger/changelog_spec.rb'
- 'spec/lib/gitlab/import_export/project/relation_factory_spec.rb' - 'spec/lib/gitlab/import_export/project/relation_factory_spec.rb'
- 'spec/models/concerns/issuable_spec.rb'
- 'spec/models/project_services/chat_message/pipeline_message_spec.rb' - 'spec/models/project_services/chat_message/pipeline_message_spec.rb'
- 'spec/routing/admin_routing_spec.rb' - 'spec/routing/admin_routing_spec.rb'
- 'spec/rubocop/cop/migration/update_large_table_spec.rb' - 'spec/rubocop/cop/migration/update_large_table_spec.rb'
......
<script> <script>
import { GlIcon, GlFormGroup, GlFormRadio, GlFormRadioGroup, GlLink } from '@gitlab/ui'; import { GlIcon, GlFormGroup, GlFormRadio, GlFormRadioGroup, GlLink } from '@gitlab/ui';
import { SNIPPET_VISIBILITY, SNIPPET_VISIBILITY_PRIVATE } from '~/snippets/constants'; import {
SNIPPET_VISIBILITY,
SNIPPET_VISIBILITY_PRIVATE,
SNIPPET_VISIBILITY_INTERNAL,
SNIPPET_VISIBILITY_PUBLIC,
} from '~/snippets/constants';
export default { export default {
components: { components: {
...@@ -29,14 +34,11 @@ export default { ...@@ -29,14 +34,11 @@ export default {
}, },
computed: { computed: {
visibilityOptions() { visibilityOptions() {
const options = []; return [
Object.keys(SNIPPET_VISIBILITY).forEach(key => { SNIPPET_VISIBILITY_PRIVATE,
options.push({ SNIPPET_VISIBILITY_INTERNAL,
value: key, SNIPPET_VISIBILITY_PUBLIC,
...SNIPPET_VISIBILITY[key], ].map(key => ({ value: key, ...SNIPPET_VISIBILITY[key] }));
});
});
return options;
}, },
}, },
}; };
......
# frozen_string_literal: true
module Ci
class LintsController < ::ApplicationController
before_action :authenticate_user!
def show
end
end
end
...@@ -15,7 +15,7 @@ class AwardEmoji < ApplicationRecord ...@@ -15,7 +15,7 @@ class AwardEmoji < ApplicationRecord
validates :awardable, presence: true, unless: :importing? validates :awardable, presence: true, unless: :importing?
validates :name, presence: true, inclusion: { in: Gitlab::Emoji.emojis_names } validates :name, presence: true, inclusion: { in: Gitlab::Emoji.emojis_names }
validates :name, uniqueness: { scope: [:user, :awardable_type, :awardable_id] }, unless: :ghost_user? validates :name, uniqueness: { scope: [:user, :awardable_type, :awardable_id] }, unless: -> { ghost_user? || importing? }
participant :user participant :user
......
...@@ -117,6 +117,8 @@ class RemoteMirror < ApplicationRecord ...@@ -117,6 +117,8 @@ class RemoteMirror < ApplicationRecord
end end
end end
options[:keep_divergent_refs] = keep_divergent_refs?
Gitlab::Git::RemoteMirror.new( Gitlab::Git::RemoteMirror.new(
project.repository.raw, project.repository.raw,
remote_name, remote_name,
......
.row.empty-state
.col-12
.svg-content
= image_tag 'illustrations/feature_moved.svg'
.col-12
.text-content.text-center
%h4= _("GitLab CI Linter has been moved")
%p
= _("To validate your GitLab CI configurations, go to 'CI/CD → Pipelines' inside your project, and click on the 'CI Lint' button.")
---
title: Allow award emoji same name & user duplicates when Importing
merge_request: 28588
author:
type: fixed
---
title: Fix issuable duplicate spec
merge_request: 28632
author: Rajendra Kadam
type: added
---
title: Remove deprecated /ci/lint page
merge_request: 28562
author:
type: removed
...@@ -19,7 +19,6 @@ Rails.application.routes.draw do ...@@ -19,7 +19,6 @@ Rails.application.routes.draw do
draw :sherlock draw :sherlock
draw :development draw :development
draw :ci
use_doorkeeper do use_doorkeeper do
controllers applications: 'oauth/applications', controllers applications: 'oauth/applications',
......
namespace :ci do
resource :lint, only: :show
root to: redirect('')
end
...@@ -34,6 +34,11 @@ using Maven and understand how to build your own packages, move onto the ...@@ -34,6 +34,11 @@ using Maven and understand how to build your own packages, move onto the
### Installing Maven ### Installing Maven
The required minimum versions are:
- Java 11.0.5+
- Maven 3.6+
Follow the instructions at [maven.apache.org](https://maven.apache.org/install.html) Follow the instructions at [maven.apache.org](https://maven.apache.org/install.html)
to download and install Maven for your local development environment. Once to download and install Maven for your local development environment. Once
installation is complete, verify you can use Maven in your terminal by running: installation is complete, verify you can use Maven in your terminal by running:
......
...@@ -219,6 +219,7 @@ group. ...@@ -219,6 +219,7 @@ group.
| Manage group labels | | ✓ | ✓ | ✓ | ✓ | | Manage group labels | | ✓ | ✓ | ✓ | ✓ |
| Create project in group | | | ✓ (3) | ✓ (3) | ✓ (3) | | Create project in group | | | ✓ (3) | ✓ (3) | ✓ (3) |
| Create/edit/delete group milestones | | | ✓ | ✓ | ✓ | | Create/edit/delete group milestones | | | ✓ | ✓ | ✓ |
| See a container registry | | ✓ | ✓ | ✓ | ✓ |
| Enable/disable a dependency proxy **(PREMIUM)** | | | ✓ | ✓ | ✓ | | Enable/disable a dependency proxy **(PREMIUM)** | | | ✓ | ✓ | ✓ |
| Use security dashboard **(ULTIMATE)** | | | ✓ | ✓ | ✓ | | Use security dashboard **(ULTIMATE)** | | | ✓ | ✓ | ✓ |
| Create subgroup | | | | ✓ (1) | ✓ | | Create subgroup | | | | ✓ (1) | ✓ |
......
...@@ -624,7 +624,7 @@ The options are: ...@@ -624,7 +624,7 @@ The options are:
- [View logs](#view-logs-ultimate) - [View logs](#view-logs-ultimate)
- [Download CSV](#downloading-data-as-csv) - [Download CSV](#downloading-data-as-csv)
- [Generate link to chart](#embedding-gitlab-managed-kubernetes-metrics) - [Copy link to chart](#embedding-gitlab-managed-kubernetes-metrics)
- [Alerts](#setting-up-alerts-for-prometheus-metrics-ultimate) - [Alerts](#setting-up-alerts-for-prometheus-metrics-ultimate)
### View Logs **(ULTIMATE)** ### View Logs **(ULTIMATE)**
...@@ -773,9 +773,11 @@ GitLab unfurls the link as an embedded metrics panel: ...@@ -773,9 +773,11 @@ GitLab unfurls the link as an embedded metrics panel:
![Embedded Metrics Rendered](img/embedded_metrics_rendered_v12_8.png) ![Embedded Metrics Rendered](img/embedded_metrics_rendered_v12_8.png)
A single chart may also be embedded. You can generate a link to the chart via the dropdown located on the right side of the chart: You can also embed a single chart. To get a link to a chart, click the
**{ellipsis_v}** **More info** menu in the upper right corner of the chart,
and select **Copy link to chart**, as shown in this example:
![Generate Link To Chart](img/generate_link_to_chart.png) ![Copy Link To Chart](img/copy_link_to_chart_v12_10.png)
The following requirements must be met for the metric to unfurl: The following requirements must be met for the metric to unfurl:
......
...@@ -55,7 +55,6 @@ Currently the following names are reserved as top level groups: ...@@ -55,7 +55,6 @@ Currently the following names are reserved as top level groups:
- `apple-touch-icon.png` - `apple-touch-icon.png`
- `assets` - `assets`
- `autocomplete` - `autocomplete`
- `ci`
- `dashboard` - `dashboard`
- `deploy.html` - `deploy.html`
- `explore` - `explore`
......
...@@ -5,14 +5,15 @@ module Gitlab ...@@ -5,14 +5,15 @@ module Gitlab
class RemoteMirror class RemoteMirror
include Gitlab::Git::WrapsGitalyErrors include Gitlab::Git::WrapsGitalyErrors
attr_reader :repository, :ref_name, :only_branches_matching, :ssh_key, :known_hosts attr_reader :repository, :ref_name, :only_branches_matching, :ssh_key, :known_hosts, :keep_divergent_refs
def initialize(repository, ref_name, only_branches_matching: [], ssh_key: nil, known_hosts: nil) def initialize(repository, ref_name, only_branches_matching: [], ssh_key: nil, known_hosts: nil, keep_divergent_refs: false)
@repository = repository @repository = repository
@ref_name = ref_name @ref_name = ref_name
@only_branches_matching = only_branches_matching @only_branches_matching = only_branches_matching
@ssh_key = ssh_key @ssh_key = ssh_key
@known_hosts = known_hosts @known_hosts = known_hosts
@keep_divergent_refs = keep_divergent_refs
end end
def update def update
...@@ -21,7 +22,8 @@ module Gitlab ...@@ -21,7 +22,8 @@ module Gitlab
ref_name, ref_name,
only_branches_matching, only_branches_matching,
ssh_key: ssh_key, ssh_key: ssh_key,
known_hosts: known_hosts known_hosts: known_hosts,
keep_divergent_refs: keep_divergent_refs
) )
end end
end end
......
...@@ -53,7 +53,7 @@ module Gitlab ...@@ -53,7 +53,7 @@ module Gitlab
encode_utf8(response.ref) encode_utf8(response.ref)
end end
def update_remote_mirror(ref_name, only_branches_matching, ssh_key: nil, known_hosts: nil) def update_remote_mirror(ref_name, only_branches_matching, ssh_key: nil, known_hosts: nil, keep_divergent_refs: false)
req_enum = Enumerator.new do |y| req_enum = Enumerator.new do |y|
first_request = Gitaly::UpdateRemoteMirrorRequest.new( first_request = Gitaly::UpdateRemoteMirrorRequest.new(
repository: @gitaly_repo, repository: @gitaly_repo,
...@@ -62,6 +62,7 @@ module Gitlab ...@@ -62,6 +62,7 @@ module Gitlab
first_request.ssh_key = ssh_key if ssh_key.present? first_request.ssh_key = ssh_key if ssh_key.present?
first_request.known_hosts = known_hosts if known_hosts.present? first_request.known_hosts = known_hosts if known_hosts.present?
first_request.keep_divergent_refs = keep_divergent_refs
y.yield(first_request) y.yield(first_request)
......
...@@ -28,7 +28,6 @@ module Gitlab ...@@ -28,7 +28,6 @@ module Gitlab
apple-touch-icon.png apple-touch-icon.png
assets assets
autocomplete autocomplete
ci
dashboard dashboard
deploy.html deploy.html
explore explore
......
...@@ -9635,9 +9635,6 @@ msgstr "" ...@@ -9635,9 +9635,6 @@ msgstr ""
msgid "GitLab / Unsubscribe" msgid "GitLab / Unsubscribe"
msgstr "" msgstr ""
msgid "GitLab CI Linter has been moved"
msgstr ""
msgid "GitLab Enterprise Edition %{plan}" msgid "GitLab Enterprise Edition %{plan}"
msgstr "" msgstr ""
...@@ -21198,9 +21195,6 @@ msgstr "" ...@@ -21198,9 +21195,6 @@ msgstr ""
msgid "To this GitLab instance" msgid "To this GitLab instance"
msgstr "" msgstr ""
msgid "To validate your GitLab CI configurations, go to 'CI/CD → Pipelines' inside your project, and click on the 'CI Lint' button."
msgstr ""
msgid "To view the roadmap, add a start or due date to one of your epics in this group or its subgroups. In the months view, only epics in the past month, current month, and next 5 months are shown." msgid "To view the roadmap, add a start or due date to one of your epics in this group or its subgroups. In the months view, only epics in the past month, current month, and next 5 months are shown."
msgstr "" msgstr ""
......
...@@ -7,14 +7,14 @@ describe Gitlab::Git::RemoteMirror do ...@@ -7,14 +7,14 @@ describe Gitlab::Git::RemoteMirror do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:repository) { project.repository } let(:repository) { project.repository }
let(:ref_name) { 'foo' } let(:ref_name) { 'foo' }
let(:options) { { only_branches_matching: ['master'], ssh_key: 'KEY', known_hosts: 'KNOWN HOSTS' } } let(:options) { { only_branches_matching: ['master'], ssh_key: 'KEY', known_hosts: 'KNOWN HOSTS', keep_divergent_refs: true } }
subject(:remote_mirror) { described_class.new(repository, ref_name, **options) } subject(:remote_mirror) { described_class.new(repository, ref_name, **options) }
it 'delegates to the Gitaly client' do it 'delegates to the Gitaly client' do
expect(repository.gitaly_remote_client) expect(repository.gitaly_remote_client)
.to receive(:update_remote_mirror) .to receive(:update_remote_mirror)
.with(ref_name, ['master'], ssh_key: 'KEY', known_hosts: 'KNOWN HOSTS') .with(ref_name, ['master'], ssh_key: 'KEY', known_hosts: 'KNOWN HOSTS', keep_divergent_refs: true)
remote_mirror.update remote_mirror.update
end end
......
...@@ -66,7 +66,7 @@ describe Gitlab::GitalyClient::RemoteService do ...@@ -66,7 +66,7 @@ describe Gitlab::GitalyClient::RemoteService do
.with(kind_of(Enumerator), kind_of(Hash)) .with(kind_of(Enumerator), kind_of(Hash))
.and_return(double(:update_remote_mirror_response)) .and_return(double(:update_remote_mirror_response))
client.update_remote_mirror(ref_name, only_branches_matching, ssh_key: ssh_key, known_hosts: known_hosts) client.update_remote_mirror(ref_name, only_branches_matching, ssh_key: ssh_key, known_hosts: known_hosts, keep_divergent_refs: true)
end end
end end
......
...@@ -41,6 +41,22 @@ describe AwardEmoji do ...@@ -41,6 +41,22 @@ describe AwardEmoji do
expect(new_award).to be_valid expect(new_award).to be_valid
end end
# Similar to allowing duplicate award emojis for ghost users,
# when Importing a project that has duplicate award emoji placed by
# ghost user we change the author to be importer user and allow
# duplicates, otherwise relation containing such duplicates
# fails to be created
context 'when importing' do
it 'allows duplicate award emoji' do
user = create(:user)
issue = create(:issue)
create(:award_emoji, user: user, awardable: issue)
new_award = build(:award_emoji, user: user, awardable: issue, importing: true)
expect(new_award).to be_valid
end
end
end end
end end
......
...@@ -159,8 +159,7 @@ describe Issuable do ...@@ -159,8 +159,7 @@ describe Issuable do
end end
it 'returns issues with a partially matching description' do it 'returns issues with a partially matching description' do
expect(issuable_class.full_search(searchable_issue.description)) expect(issuable_class.full_search('cut')).to eq([searchable_issue])
.to eq([searchable_issue])
end end
it 'returns issues with a matching description regardless of the casing' do it 'returns issues with a matching description regardless of the casing' do
......
...@@ -142,6 +142,26 @@ describe RemoteMirror, :mailer do ...@@ -142,6 +142,26 @@ describe RemoteMirror, :mailer do
end end
end end
describe '#update_repository' do
let(:git_remote_mirror) { spy }
before do
stub_const('Gitlab::Git::RemoteMirror', git_remote_mirror)
end
it 'includes the `keep_divergent_refs` setting' do
mirror = build_stubbed(:remote_mirror, keep_divergent_refs: true)
mirror.update_repository({})
expect(git_remote_mirror).to have_received(:new).with(
anything,
mirror.remote_name,
hash_including(keep_divergent_refs: true)
)
end
end
describe '#safe_url' do describe '#safe_url' do
context 'when URL contains credentials' do context 'when URL contains credentials' do
it 'masks the credentials' do it 'masks the credentials' do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册