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
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 18:08:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 18:08:01 +0300
commit53b1f4eaa2a451aaba908a5fee7ce97a930021ac (patch)
tree66501ec0de9f529ee1cfc7cd6c4b481b1fc76662 /app
parent684d65316ac77c62f47d68b9926eea8af30db227 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/snippets/components/snippet_visibility_edit.vue20
-rw-r--r--app/controllers/ci/lints_controller.rb10
-rw-r--r--app/models/award_emoji.rb2
-rw-r--r--app/models/remote_mirror.rb2
-rw-r--r--app/views/ci/lints/show.html.haml9
5 files changed, 14 insertions, 29 deletions
diff --git a/app/assets/javascripts/snippets/components/snippet_visibility_edit.vue b/app/assets/javascripts/snippets/components/snippet_visibility_edit.vue
index 80710a88bb2..299bb8fcfad 100644
--- a/app/assets/javascripts/snippets/components/snippet_visibility_edit.vue
+++ b/app/assets/javascripts/snippets/components/snippet_visibility_edit.vue
@@ -1,6 +1,11 @@
<script>
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 {
components: {
@@ -29,14 +34,11 @@ export default {
},
computed: {
visibilityOptions() {
- const options = [];
- Object.keys(SNIPPET_VISIBILITY).forEach(key => {
- options.push({
- value: key,
- ...SNIPPET_VISIBILITY[key],
- });
- });
- return options;
+ return [
+ SNIPPET_VISIBILITY_PRIVATE,
+ SNIPPET_VISIBILITY_INTERNAL,
+ SNIPPET_VISIBILITY_PUBLIC,
+ ].map(key => ({ value: key, ...SNIPPET_VISIBILITY[key] }));
},
},
};
diff --git a/app/controllers/ci/lints_controller.rb b/app/controllers/ci/lints_controller.rb
deleted file mode 100644
index 99ce24bd435..00000000000
--- a/app/controllers/ci/lints_controller.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-module Ci
- class LintsController < ::ApplicationController
- before_action :authenticate_user!
-
- def show
- end
- end
-end
diff --git a/app/models/award_emoji.rb b/app/models/award_emoji.rb
index 5a33a8f89df..5ba6100f169 100644
--- a/app/models/award_emoji.rb
+++ b/app/models/award_emoji.rb
@@ -15,7 +15,7 @@ class AwardEmoji < ApplicationRecord
validates :awardable, presence: true, unless: :importing?
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
diff --git a/app/models/remote_mirror.rb b/app/models/remote_mirror.rb
index 1e5c93cd913..0334d63dd36 100644
--- a/app/models/remote_mirror.rb
+++ b/app/models/remote_mirror.rb
@@ -117,6 +117,8 @@ class RemoteMirror < ApplicationRecord
end
end
+ options[:keep_divergent_refs] = keep_divergent_refs?
+
Gitlab::Git::RemoteMirror.new(
project.repository.raw,
remote_name,
diff --git a/app/views/ci/lints/show.html.haml b/app/views/ci/lints/show.html.haml
deleted file mode 100644
index d4455749803..00000000000
--- a/app/views/ci/lints/show.html.haml
+++ /dev/null
@@ -1,9 +0,0 @@
-.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.")