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>2019-10-18 00:06:41 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-18 00:06:41 +0300
commitda35510cdad8f8d3cb6c119682dc2735531983cd (patch)
treed42432c9ddc0d55a3c6316cdb539af11244a148f /app
parent7f82744e89f22bdd2d13f85ca4dc66e088f3da5c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/groups/components/group_item.vue6
-rw-r--r--app/graphql/types/merge_request_type.rb17
-rw-r--r--app/helpers/application_settings_helper.rb3
-rw-r--r--app/models/application_setting_implementation.rb3
-rw-r--r--app/models/project.rb17
-rw-r--r--app/models/project_wiki.rb2
-rw-r--r--app/views/admin/application_settings/_visibility_and_access.html.haml5
-rw-r--r--app/views/projects/pipelines/_info.html.haml6
8 files changed, 49 insertions, 10 deletions
diff --git a/app/assets/javascripts/groups/components/group_item.vue b/app/assets/javascripts/groups/components/group_item.vue
index 830385941d8..ede74d18ed4 100644
--- a/app/assets/javascripts/groups/components/group_item.vue
+++ b/app/assets/javascripts/groups/components/group_item.vue
@@ -104,11 +104,11 @@ export default {
/>
<div
:class="{ 'd-sm-flex': !group.isChildrenLoading }"
- class="avatar-container rect-avatar s32 d-none flex-grow-0 flex-shrink-0 "
+ class="avatar-container rect-avatar s40 d-none flex-grow-0 flex-shrink-0 "
>
<a :href="group.relativePath" class="no-expand">
- <img v-if="hasAvatar" :src="group.avatarUrl" class="avatar s32" />
- <identicon v-else :entity-id="group.id" :entity-name="group.name" size-class="s32" />
+ <img v-if="hasAvatar" :src="group.avatarUrl" class="avatar s40" />
+ <identicon v-else :entity-id="group.id" :entity-name="group.name" size-class="s40" />
</a>
</div>
<div class="group-text-container d-flex flex-fill align-items-center">
diff --git a/app/graphql/types/merge_request_type.rb b/app/graphql/types/merge_request_type.rb
index 1baaa33c819..71a65dc6713 100644
--- a/app/graphql/types/merge_request_type.rb
+++ b/app/graphql/types/merge_request_type.rb
@@ -55,12 +55,27 @@ module Types
field :web_url, GraphQL::STRING_TYPE, null: true # rubocop:disable Graphql/Descriptions
field :upvotes, GraphQL::INT_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :downvotes, GraphQL::INT_TYPE, null: false # rubocop:disable Graphql/Descriptions
- field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false # rubocop:disable Graphql/Descriptions
field :head_pipeline, Types::Ci::PipelineType, null: true, method: :actual_head_pipeline # rubocop:disable Graphql/Descriptions
field :pipelines, Types::Ci::PipelineType.connection_type, # rubocop:disable Graphql/Descriptions
resolver: Resolvers::MergeRequestPipelinesResolver
+ field :milestone, Types::MilestoneType, description: 'The milestone this merge request is linked to',
+ null: true,
+ resolve: -> (obj, _args, _ctx) { Gitlab::Graphql::Loaders::BatchModelLoader.new(Milestone, obj.milestone_id).find }
+ field :assignees, Types::UserType.connection_type, null: true, complexity: 5, description: 'The list of assignees for the merge request'
+ field :participants, Types::UserType.connection_type, null: true, complexity: 5, description: 'The list of participants on the merge request'
+ field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false, complexity: 5,
+ description: 'Boolean flag for whether the currently logged in user is subscribed to this MR'
+ field :labels, Types::LabelType.connection_type, null: true, complexity: 5, description: 'The list of labels on the merge request'
+ field :discussion_locked, GraphQL::BOOLEAN_TYPE, description: 'Boolean flag determining if comments on the merge request are locked to members only',
+ null: false,
+ resolve: -> (obj, _args, _ctx) { !!obj.discussion_locked }
+ field :time_estimate, GraphQL::INT_TYPE, null: false, description: 'The time estimate for the merge request'
+ field :total_time_spent, GraphQL::INT_TYPE, null: false, description: 'Total time reported as spent on the merge request'
+ field :reference, GraphQL::STRING_TYPE, null: false, method: :to_reference, description: 'Internal merge request reference. Returned in shortened format by default' do
+ argument :full, GraphQL::BOOLEAN_TYPE, required: false, default_value: false, description: 'Boolean option specifying whether the reference should be returned in full'
+ end
field :task_completion_status, Types::TaskCompletionStatus, null: false # rubocop:disable Graphql/Descriptions
end
end
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb
index 115d1031a8a..df17b82412f 100644
--- a/app/helpers/application_settings_helper.rb
+++ b/app/helpers/application_settings_helper.rb
@@ -291,7 +291,8 @@ module ApplicationSettingsHelper
:snowplow_enabled,
:snowplow_site_id,
:push_event_hooks_limit,
- :push_event_activities_limit
+ :push_event_activities_limit,
+ :custom_http_clone_url_root
]
end
diff --git a/app/models/application_setting_implementation.rb b/app/models/application_setting_implementation.rb
index b341cf04403..0c0ffb67c9a 100644
--- a/app/models/application_setting_implementation.rb
+++ b/app/models/application_setting_implementation.rb
@@ -128,7 +128,8 @@ module ApplicationSettingImplementation
snowplow_collector_hostname: nil,
snowplow_cookie_domain: nil,
snowplow_enabled: false,
- snowplow_site_id: nil
+ snowplow_site_id: nil,
+ custom_http_clone_url_root: nil
}
end
diff --git a/app/models/project.rb b/app/models/project.rb
index f1e232e95f8..3525f37f8d5 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1036,8 +1036,8 @@ class Project < ApplicationRecord
end
end
- def web_url
- Gitlab::Routing.url_helpers.project_url(self)
+ def web_url(only_path: nil)
+ Gitlab::Routing.url_helpers.project_url(self, only_path: only_path)
end
def readme_url
@@ -1316,7 +1316,18 @@ class Project < ApplicationRecord
end
def http_url_to_repo
- "#{web_url}.git"
+ custom_root = Gitlab::CurrentSettings.custom_http_clone_url_root
+
+ project_url = if custom_root.present?
+ Gitlab::Utils.append_path(
+ custom_root,
+ web_url(only_path: true)
+ )
+ else
+ web_url
+ end
+
+ "#{project_url}.git"
end
# Is overridden in EE
diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb
index 218be974218..bb222ac7629 100644
--- a/app/models/project_wiki.rb
+++ b/app/models/project_wiki.rb
@@ -54,7 +54,7 @@ class ProjectWiki
end
def http_url_to_repo
- "#{Gitlab.config.gitlab.url}/#{full_path}.git"
+ @project.http_url_to_repo.sub(%r{git\z}, 'wiki.git')
end
def wiki_base_path
diff --git a/app/views/admin/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml
index e57ef1ea18f..be5f1f4f9a8 100644
--- a/app/views/admin/application_settings/_visibility_and_access.html.haml
+++ b/app/views/admin/application_settings/_visibility_and_access.html.haml
@@ -53,6 +53,11 @@
= select(:application_setting, :enabled_git_access_protocol, [['Both SSH and HTTP(S)', nil], ['Only SSH', 'ssh'], ['Only HTTP(S)', 'http']], {}, class: 'form-control')
%span.form-text.text-muted#clone-protocol-help
= _('Allow only the selected protocols to be used for Git access.')
+ .form-group
+ = f.label :custom_http_clone_url_root, _('Custom Git clone URL for HTTP(S)'), class: 'label-bold'
+ = f.text_field :custom_http_clone_url_root, class: 'form-control', placeholder: 'https://git.example.com', :'aria-describedby' => 'custom_http_clone_url_root_help_block'
+ %span.form-text.text-muted#custom_http_clone_url_root_help_block
+ = _('Replaces the clone URL root.')
- ApplicationSetting::SUPPORTED_KEY_TYPES.each do |type|
- field_name = :"#{type}_key_restriction"
diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml
index 094cbf755e1..4eec81c9125 100644
--- a/app/views/projects/pipelines/_info.html.haml
+++ b/app/views/projects/pipelines/_info.html.haml
@@ -59,3 +59,9 @@
%span.js-details-content.hide
= link_to @pipeline.sha, project_commit_path(@project, @pipeline.sha), class: "commit-sha commit-hash-full"
= clipboard_button(text: @pipeline.sha, title: _("Copy commit SHA"))
+
+ .well-segment.related-merge-request-info
+ .icon-container
+ = sprite_icon("git-merge")
+ %span.related-merge-requests
+ = @pipeline.all_related_merge_request_text