Skip to content
Snippets Groups Projects
Commit abb5b9f6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce

parents 397ebc5f 8cc47bbf
No related branches found
No related tags found
No related merge requests found
Showing
with 163 additions and 135 deletions
Please view this file on the master branch, on stable branches it's out of date.
 
v 8.0.0 (unreleased)
- Prevent too many redirects upon login when home page URL is set to external_url (Stan Hu)
- Improve dropdown positioning on the project home page (Hannes Rosenögger)
- Upgrade browser gem to 1.0.0 to avoid warning in IE11 compatibilty mode (Stan Hu)
- Fix "Reload with full diff" URL button in compare branch view (Stan Hu)
- Remove user OAuth tokens from the database and request new tokens each session (Stan Hu)
- Only show recent push event if the branch still exists or a recent merge request has not been created (Stan Hu)
- Remove satellites
Loading
Loading
@@ -16,14 +16,19 @@ v 8.0.0 (unreleased)
- Create cross-reference for closing references on commits pushed to non-default branches (Maël Valais)
- Ability to search milestones
- Gracefully handle SMTP user input errors (e.g. incorrect email addresses) to prevent Sidekiq retries (Stan Hu)
- Improve abuse reports management from admin area
- Move dashboard activity to separate page
- Improve performance of git blame
- Limit content width to 1200px for most of pages to improve readability on big screens
- Fix 500 error when submit project snippet without body
- Improve search page usability
- Bring more UI consistency in way how projects, snippets and groups lists are rendered
 
v 7.14.1 (unreleased)
v 7.14.1
- Improve abuse reports management from admin area
- Fix "Reload with full diff" URL button in compare branch view (Stan Hu)
- Only include base URL in OmniAuth full_host parameter (Stan Hu)
- Fix Error 500 in API when accessing a group that has an avatar (Stan Hu)
- Ability to enable SSL verification for Webhooks
 
v 7.14.0
- Fix bug where non-project members of the target project could set labels on new merge requests.
Loading
Loading
Loading
Loading
@@ -273,6 +273,6 @@ gem "newrelic_rpm"
 
gem 'octokit', '3.7.0'
 
gem "mail_room", "~> 0.4.0"
gem "mail_room", "~> 0.4.1"
 
gem 'email_reply_parser'
Loading
Loading
@@ -372,7 +372,7 @@ GEM
systemu (~> 2.6.2)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mail_room (0.4.0)
mail_room (0.4.1)
method_source (0.8.2)
mime-types (1.25.1)
mimemagic (0.3.0)
Loading
Loading
@@ -808,7 +808,7 @@ DEPENDENCIES
jquery-ui-rails
kaminari (~> 0.15.1)
letter_opener
mail_room (~> 0.4.0)
mail_room (~> 0.4.1)
minitest (~> 5.3.0)
mousetrap-rails
mysql2
Loading
Loading
Loading
Loading
@@ -55,7 +55,6 @@ class Dispatcher
new Activities()
when 'dashboard:projects:starred'
new Activities()
new ProjectsList()
when 'projects:commit:show'
new Commit()
new Diff()
Loading
Loading
@@ -70,7 +69,6 @@ class Dispatcher
when 'groups:show'
new Activities()
shortcut_handler = new ShortcutsNavigation()
new ProjectsList()
when 'groups:group_members:index'
new GroupMembers()
new UsersSelect()
Loading
Loading
@@ -96,8 +94,6 @@ class Dispatcher
when 'users:show'
new User()
new Activities()
when 'admin:users:show'
new ProjectsList()
 
switch path.first()
when 'admin'
Loading
Loading
Loading
Loading
@@ -157,3 +157,41 @@
white-space: nowrap;
max-width: $max_width;
}
/*
* Base mixin for lists in GitLab
*/
@mixin basic-list {
margin: 5px 0px;
padding: 0px;
list-style: none;
li {
padding: 10px 0;
border-bottom: 1px solid #EEE;
overflow: hidden;
display: block;
margin: 0px;
&:last-child {
border:none
}
&.active {
background: #f9f9f9;
a {
font-weight: bold;
}
}
&.hide {
display: none;
}
&.light {
a {
color: #777;
}
}
}
}
Loading
Loading
@@ -375,9 +375,9 @@ table {
}
 
.center-top-menu {
border-bottom: 1px solid #EEE;
list-style: none;
text-align: center;
margin-top: 5px;
padding-bottom: 15px;
margin-bottom: 15px;
 
Loading
Loading
@@ -385,7 +385,7 @@ table {
display: inline-block;
 
a {
padding: 10px;
padding: 15px;
}
 
&.active a {
Loading
Loading
Loading
Loading
@@ -93,28 +93,12 @@ ol, ul {
 
/** light list with border-bottom between li **/
ul.bordered-list {
margin: 5px 0px;
padding: 0px;
li {
padding: 5px 0;
border-bottom: 1px solid #EEE;
overflow: hidden;
display: block;
margin: 0px;
&:last-child { border:none }
&.active {
background: #f9f9f9;
a { font-weight: bold; }
}
&.light {
a { color: #777; }
}
}
@include basic-list;
 
&.top-list {
li:first-child {
padding-top: 0;
h4, h5 {
margin-top: 0;
}
Loading
Loading
Loading
Loading
@@ -162,78 +162,6 @@ ul.nav.nav-projects-tabs {
margin: 0px;
}
 
.my-projects,
.public-projects {
li {
.project-info {
margin-bottom: 10px;
overflow: hidden;
}
.access-icon {
color: #AAA;
margin-left: 10px;
i {
color: #AAA;
}
}
}
}
.public-clone {
background: #EEE;
color: #777;
padding: 6px 10px;
margin: 1px;
font-weight: normal;
}
.public-projects .repo-info {
color: #777;
a {
color: #777;
}
}
.project-side {
.project-fork-icon {
float: left;
font-size: 26px;
margin-right: 10px;
line-height: 1.5;
}
.panel {
@include border-radius(3px);
.panel-heading, .panel-footer {
font-weight: normal;
background-color: transparent;
color: #666;
border-color: #EEE;
}
.actions {
margin-top: 10px;
}
.nav-pills a {
padding: 10px;
font-weight: bold;
color: $gl-link-color;
}
.nav {
margin-bottom: 15px;
}
}
.ci-status-image {
max-height: 22px;
}
}
.transfer-project .select2-container {
min-width: 200px;
}
Loading
Loading
@@ -334,23 +262,32 @@ pre.light-well {
}
}
 
.project-row {
.project-full-name {
font-weight: bold;
font-size: 15px;
}
/*
* Projects list rendered on dashboard and user page
*/
.projects-list {
@include basic-list;
 
.project-description {
color: #888;
font-size: 13px;
.project-row {
.project-full-name {
@include str-truncated;
font-weight: bold;
font-size: 15px;
}
 
p {
margin-bottom: 0;
.project-description {
color: #888;
font-size: 13px;
p {
@include str-truncated;
margin-bottom: 0;
color: #888;
}
}
}
}
 
.my-projects .project-row {
padding: 10px 0;
.panel .projects-list li {
padding: 10px 15px;
}
.search-results {
.search-result-row {
border-bottom: 1px solid #EEE;
padding-bottom: 10px;
margin-bottom: 10px;
border-bottom: 1px solid #DDD;
padding-bottom: 15px;
margin-bottom: 15px;
}
}
.search-holder {
max-width: 600px;
margin: 0 auto;
margin-bottom: 20px;
input {
border-color: #BBB;
font-weight: bold;
}
}
Loading
Loading
@@ -6,3 +6,27 @@
.snippet-form-holder .file-holder .file-title {
padding: 2px;
}
.snippet-row {
.snippet-title {
font-size: 15px;
font-weight: bold;
line-height: 20px;
margin-bottom: 2px;
.monospace {
font-weight: normal;
}
}
.snippet-info {
color: #888;
font-size: 13px;
line-height: 24px;
a {
color: #888;
}
}
}
Loading
Loading
@@ -39,6 +39,6 @@ class Admin::HooksController < Admin::ApplicationController
end
 
def hook_params
params.require(:hook).permit(:url)
params.require(:hook).permit(:url, :enable_ssl_verification)
end
end
Loading
Loading
@@ -55,7 +55,9 @@ class ApplicationController < ActionController::Base
 
def authenticate_user!(*args)
# If user is not signed-in and tries to access root_path - redirect him to landing page
if current_application_settings.home_page_url.present?
# Don't redirect to the default URL to prevent endless redirections
if current_application_settings.home_page_url.present? &&
current_application_settings.home_page_url.chomp('/') != Gitlab.config.gitlab['url'].chomp('/')
if current_user.nil? && root_path == request.path
redirect_to current_application_settings.home_page_url and return
end
Loading
Loading
Loading
Loading
@@ -53,6 +53,7 @@ class Projects::HooksController < Projects::ApplicationController
end
 
def hook_params
params.require(:hook).permit(:url, :push_events, :issues_events, :merge_requests_events, :tag_push_events, :note_events)
params.require(:hook).permit(:url, :push_events, :issues_events,
:merge_requests_events, :tag_push_events, :note_events, :enable_ssl_verification)
end
end
Loading
Loading
@@ -8,7 +8,7 @@ class Projects::ServicesController < Projects::ApplicationController
:push_events, :issues_events, :merge_requests_events, :tag_push_events,
:note_events, :send_from_committer_email, :disable_diffs, :external_wiki_url,
:notify, :color,
:server_host, :server_port, :default_irc_uri]
:server_host, :server_port, :default_irc_uri, :enable_ssl_verification]
# Authorize
before_action :authorize_admin_project!
before_action :service, only: [:edit, :update, :test]
Loading
Loading
Loading
Loading
@@ -30,9 +30,14 @@ class Projects::SnippetsController < Projects::ApplicationController
def create
@snippet = CreateSnippetService.new(@project, current_user,
snippet_params).execute
respond_with(@snippet,
location: namespace_project_snippet_path(@project.namespace,
@project, @snippet))
if @snippet.valid?
respond_with(@snippet,
location: namespace_project_snippet_path(@project.namespace,
@project, @snippet))
else
render :new
end
end
 
def edit
Loading
Loading
Loading
Loading
@@ -2,13 +2,21 @@ class TrendingProjectsFinder
def execute(current_user, start_date = nil)
start_date ||= Date.today - 1.month
 
projects = projects_for(current_user)
# Determine trending projects based on comments count
# for period of time - ex. month
projects.joins(:notes).where('notes.created_at > ?', start_date).
select("projects.*, count(notes.id) as ncount").
group("projects.id").reorder("ncount DESC")
trending_project_ids = Note.
select("notes.project_id, count(notes.project_id) as pcount").
where('notes.created_at > ?', start_date).
group("project_id").
reorder("pcount DESC").
map(&:project_id)
sql_order_ids = trending_project_ids.reverse.
map { |project_id| "id = #{project_id}" }.join(", ")
# Get list of projects that user allowed to see
projects = projects_for(current_user)
projects.where(id: trending_project_ids).reorder(sql_order_ids)
end
 
private
Loading
Loading
Loading
Loading
@@ -25,6 +25,7 @@ class WebHook < ActiveRecord::Base
default_value_for :note_events, false
default_value_for :merge_requests_events, false
default_value_for :tag_push_events, false
default_value_for :enable_ssl_verification, false
 
# HTTParty timeout
default_timeout Gitlab.config.gitlab.webhook_timeout
Loading
Loading
@@ -41,7 +42,7 @@ class WebHook < ActiveRecord::Base
"Content-Type" => "application/json",
"X-Gitlab-Event" => hook_name.singularize.titleize
},
verify: false)
verify: enable_ssl_verification)
else
post_url = url.gsub("#{parsed_url.userinfo}@", "")
auth = {
Loading
Loading
@@ -54,7 +55,7 @@ class WebHook < ActiveRecord::Base
"Content-Type" => "application/json",
"X-Gitlab-Event" => hook_name.singularize.titleize
},
verify: false,
verify: enable_ssl_verification,
basic_auth: auth)
end
rescue SocketError, Errno::ECONNRESET, Errno::ECONNREFUSED, Net::OpenTimeout => e
Loading
Loading
Loading
Loading
@@ -23,7 +23,7 @@ require "addressable/uri"
class BuildkiteService < CiService
ENDPOINT = "https://buildkite.com"
 
prop_accessor :project_url, :token
prop_accessor :project_url, :token, :enable_ssl_verification
 
validates :project_url, presence: true, if: :activated?
validates :token, presence: true, if: :activated?
Loading
Loading
@@ -37,6 +37,7 @@ class BuildkiteService < CiService
def compose_service_hook
hook = service_hook || build_service_hook
hook.url = webhook_url
hook.enable_ssl_verification = enable_ssl_verification
hook.save
end
 
Loading
Loading
@@ -96,7 +97,11 @@ class BuildkiteService < CiService
 
{ type: 'text',
name: 'project_url',
placeholder: "#{ENDPOINT}/example/project" }
placeholder: "#{ENDPOINT}/example/project" },
{ type: 'checkbox',
name: 'enable_ssl_verification',
title: "Enable SSL verification" }
]
end
 
Loading
Loading
Loading
Loading
@@ -21,7 +21,7 @@
class GitlabCiService < CiService
API_PREFIX = "api/v1"
 
prop_accessor :project_url, :token
prop_accessor :project_url, :token, :enable_ssl_verification
validates :project_url,
presence: true,
format: { with: /\A#{URI.regexp(%w(http https))}\z/, message: "should be a valid url" }, if: :activated?
Loading
Loading
@@ -34,6 +34,7 @@ class GitlabCiService < CiService
def compose_service_hook
hook = service_hook || build_service_hook
hook.url = [project_url, "/build", "?token=#{token}"].join("")
hook.enable_ssl_verification = enable_ssl_verification
hook.save
end
 
Loading
Loading
@@ -136,7 +137,8 @@ class GitlabCiService < CiService
def fields
[
{ type: 'text', name: 'token', placeholder: 'GitLab CI project specific token' },
{ type: 'text', name: 'project_url', placeholder: 'http://ci.gitlabhq.com/projects/3' }
{ type: 'text', name: 'project_url', placeholder: 'http://ci.gitlabhq.com/projects/3' },
{ type: 'checkbox', name: 'enable_ssl_verification', title: "Enable SSL verification" }
]
end
 
Loading
Loading
Loading
Loading
@@ -18,6 +18,13 @@
= f.label :url, "URL:", class: 'control-label'
.col-sm-10
= f.text_field :url, class: "form-control"
.form-group
= f.label :enable_ssl_verification, "SSL verification", class: 'control-label checkbox'
.col-sm-10
.checkbox
= f.label :enable_ssl_verification do
= f.check_box :enable_ssl_verification
%strong Enable SSL verification
.form-actions
= f.submit "Add System Hook", class: "btn btn-create"
%hr
Loading
Loading
@@ -32,6 +39,7 @@
.list-item-name
= link_to admin_hook_path(hook) do
%strong= hook.url
%p SSL Verification: #{hook.enable_ssl_verification ? "enabled" : "disabled"}
 
.pull-right
= link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-sm"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment