Commit 7b00721b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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

parents 041ce7b3 7feec5fe
...@@ -62,9 +62,11 @@ v 7.10.0 (unreleased) ...@@ -62,9 +62,11 @@ v 7.10.0 (unreleased)
- Project labels are now available over the API under the "tag_list" field (Cristian Medina) - Project labels are now available over the API under the "tag_list" field (Cristian Medina)
- Fixed link paths for HTTP and SSH on the admin project view (Jeremy Maziarz) - Fixed link paths for HTTP and SSH on the admin project view (Jeremy Maziarz)
- Fix and improve help rendering (Sullivan Sénéchal) - Fix and improve help rendering (Sullivan Sénéchal)
- Fix final line in EmailsOnPush email diff being rendered as error.
v 7.9.3 v 7.9.3
- Contains no changes - Contains no changes
- Add icons to Add dropdown items.
v 7.9.2 v 7.9.2
- Contains no changes - Contains no changes
......
...@@ -39,7 +39,7 @@ gem "browser" ...@@ -39,7 +39,7 @@ gem "browser"
# Extracting information from a git repository # Extracting information from a git repository
# Provide access to Gitlab::Git library # Provide access to Gitlab::Git library
gem "gitlab_git", '~> 7.1.3' gem "gitlab_git", '~> 7.1.6'
# Ruby/Rack Git Smart-HTTP Server Handler # Ruby/Rack Git Smart-HTTP Server Handler
gem 'gitlab-grack', '~> 2.0.0.rc2', require: 'grack' gem 'gitlab-grack', '~> 2.0.0.rc2', require: 'grack'
......
...@@ -212,7 +212,7 @@ GEM ...@@ -212,7 +212,7 @@ GEM
mime-types (~> 1.19) mime-types (~> 1.19)
gitlab_emoji (0.1.0) gitlab_emoji (0.1.0)
gemojione (~> 2.0) gemojione (~> 2.0)
gitlab_git (7.1.3) gitlab_git (7.1.6)
activesupport (~> 4.0) activesupport (~> 4.0)
charlock_holmes (~> 0.6) charlock_holmes (~> 0.6)
gitlab-linguist (~> 3.0) gitlab-linguist (~> 3.0)
...@@ -703,7 +703,7 @@ DEPENDENCIES ...@@ -703,7 +703,7 @@ DEPENDENCIES
gitlab-grack (~> 2.0.0.rc2) gitlab-grack (~> 2.0.0.rc2)
gitlab-linguist (~> 3.0.1) gitlab-linguist (~> 3.0.1)
gitlab_emoji (~> 0.1) gitlab_emoji (~> 0.1)
gitlab_git (~> 7.1.3) gitlab_git (~> 7.1.6)
gitlab_meta (= 7.0) gitlab_meta (= 7.0)
gitlab_omniauth-ldap (= 1.2.1) gitlab_omniauth-ldap (= 1.2.1)
gollum-lib (~> 4.0.2) gollum-lib (~> 4.0.2)
......
...@@ -8,7 +8,7 @@ class Import::BaseController < ApplicationController ...@@ -8,7 +8,7 @@ class Import::BaseController < ApplicationController
namespace.add_owner(current_user) namespace.add_owner(current_user)
rescue ActiveRecord::RecordNotUnique, ActiveRecord::RecordInvalid rescue ActiveRecord::RecordNotUnique, ActiveRecord::RecordInvalid
namespace = Namespace.find_by_path_or_name(@target_namespace) namespace = Namespace.find_by_path_or_name(@target_namespace)
unless namespace.owner == current_user unless current_user.can?(:create_projects, namespace)
@already_been_taken = true @already_been_taken = true
return false return false
end end
......
...@@ -33,12 +33,8 @@ module EmailsHelper ...@@ -33,12 +33,8 @@ module EmailsHelper
end end
end end
def add_email_highlight_css
Rugments::Themes::Github.render(scope: '.highlight')
end
def color_email_diff(diffcontent) def color_email_diff(diffcontent)
formatter = Rugments::Formatters::HTML.new(cssclass: 'highlight') formatter = Rugments::Formatters::HTML.new(cssclass: "highlight", inline_theme: :github)
lexer = Rugments::Lexers::Diff.new lexer = Rugments::Lexers::Diff.new
raw formatter.format(lexer.lex(diffcontent)) raw formatter.format(lexer.lex(diffcontent))
end end
......
...@@ -183,7 +183,11 @@ class Event < ActiveRecord::Base ...@@ -183,7 +183,11 @@ class Event < ActiveRecord::Base
elsif commented? elsif commented?
"commented on" "commented on"
elsif created_project? elsif created_project?
if project.import?
"imported"
else
"created" "created"
end
else else
"opened" "opened"
end end
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
%a.twitter-share-button{ | %a.twitter-share-button{ |
href: "https://twitter.com/share", | href: "https://twitter.com/share", |
"data-url" => event.project.web_url, | "data-url" => event.project.web_url, |
"data-text" => "I just created a new project in GitLab! GitLab is version control on your server.", | "data-text" => "I just #{event.project.imported? ? "imported" : "created"} a new project in GitLab! GitLab is version control on your server.", |
"data-size" => "medium", | "data-size" => "medium", |
"data-related" => "gitlab", | "data-related" => "gitlab", |
"data-hashtags" => "gitlab", | "data-hashtags" => "gitlab", |
......
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
} }
.file-stats .deleted-file { .file-stats .deleted-file {
color: #B00; color: #B00;
} }}
#{add_email_highlight_css}
%body %body
%div.content %div.content
= yield = yield
......
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
%strong %strong
= diff.new_path = diff.new_path
%hr %hr
%pre
= color_email_diff(diff.diff) = color_email_diff(diff.diff)
%br %br
......
...@@ -6,28 +6,32 @@ ...@@ -6,28 +6,32 @@
- if @project.issues_enabled && can?(current_user, :write_issue, @project) - if @project.issues_enabled && can?(current_user, :write_issue, @project)
%li %li
= link_to url_for_new_issue(@project, only_path: true), title: "New Issue" do = link_to url_for_new_issue(@project, only_path: true), title: "New Issue" do
%i.fa.fa-fw.fa-exclamation-circle
New issue New issue
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project) - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
%li %li
= link_to new_namespace_project_merge_request_path(@project.namespace, @project), title: "New Merge Request" do = link_to new_namespace_project_merge_request_path(@project.namespace, @project), title: "New Merge Request" do
%i.fa.fa-fw.fa-tasks
New merge request New merge request
- if @project.snippets_enabled && can?(current_user, :write_snippet, @project) - if @project.snippets_enabled && can?(current_user, :write_snippet, @project)
%li %li
= link_to new_namespace_project_snippet_path(@project.namespace, @project), title: "New Snippet" do = link_to new_namespace_project_snippet_path(@project.namespace, @project), title: "New Snippet" do
%i.fa.fa-fw.fa-file-text-o
New snippet New snippet
- if can?(current_user, :admin_project_member, @project) - if can?(current_user, :admin_project_member, @project)
%li %li
= link_to namespace_project_project_members_path(@project.namespace, @project), title: "New project member" do = link_to namespace_project_project_members_path(@project.namespace, @project), title: "New project member" do
%i.fa.fa-fw.fa-users
New project member New project member
- if can? current_user, :push_code, @project - if can? current_user, :push_code, @project
%li.divider %li.divider
%li %li
= link_to new_namespace_project_branch_path(@project.namespace, @project) do = link_to new_namespace_project_branch_path(@project.namespace, @project) do
%i.fa.fa-code-fork %i.fa.fa-fw.fa-code-fork
Git branch New branch
%li %li
= link_to new_namespace_project_tag_path(@project.namespace, @project) do = link_to new_namespace_project_tag_path(@project.namespace, @project) do
%i.fa.fa-tag %i.fa.fa-fw.fa-tag
Git tag New tag
...@@ -10,29 +10,16 @@ module Gitlab ...@@ -10,29 +10,16 @@ module Gitlab
end end
def execute def execute
@project = Project.new( ::Projects::CreateService.new(current_user,
name: repo["name"], name: repo["name"],
path: repo["slug"], path: repo["slug"],
description: repo["description"], description: repo["description"],
namespace: namespace, namespace_id: namespace.id,
creator: current_user,
visibility_level: repo["is_private"] ? Gitlab::VisibilityLevel::PRIVATE : Gitlab::VisibilityLevel::PUBLIC, visibility_level: repo["is_private"] ? Gitlab::VisibilityLevel::PRIVATE : Gitlab::VisibilityLevel::PUBLIC,
import_type: "bitbucket", import_type: "bitbucket",
import_source: "#{repo["owner"]}/#{repo["slug"]}", import_source: "#{repo["owner"]}/#{repo["slug"]}",
import_url: "ssh://git@bitbucket.org/#{repo["owner"]}/#{repo["slug"]}.git" import_url: "ssh://git@bitbucket.org/#{repo["owner"]}/#{repo["slug"]}.git"
) ).execute
if @project.save!
@project.reload
if @project.import_failed?
@project.import_retry
else
@project.import_start
end
end
@project
end end
end end
end end
......
...@@ -10,29 +10,16 @@ module Gitlab ...@@ -10,29 +10,16 @@ module Gitlab
end end
def execute def execute
@project = Project.new( ::Projects::CreateService.new(current_user,
name: repo.name, name: repo.name,
path: repo.name, path: repo.name,
description: repo.description, description: repo.description,
namespace: namespace, namespace_id: namespace.id,
creator: current_user,
visibility_level: repo.private ? Gitlab::VisibilityLevel::PRIVATE : Gitlab::VisibilityLevel::PUBLIC, visibility_level: repo.private ? Gitlab::VisibilityLevel::PRIVATE : Gitlab::VisibilityLevel::PUBLIC,
import_type: "github", import_type: "github",
import_source: repo.full_name, import_source: repo.full_name,
import_url: repo.clone_url.sub("https://", "https://#{current_user.github_access_token}@") import_url: repo.clone_url.sub("https://", "https://#{current_user.github_access_token}@")
) ).execute
if @project.save!
@project.reload
if @project.import_failed?
@project.import_retry
else
@project.import_start
end
end
@project
end end
end end
end end
......
...@@ -10,29 +10,16 @@ module Gitlab ...@@ -10,29 +10,16 @@ module Gitlab
end end
def execute def execute
@project = Project.new( ::Projects::CreateService.new(current_user,
name: repo["name"], name: repo["name"],
path: repo["path"], path: repo["path"],
description: repo["description"], description: repo["description"],
namespace: namespace, namespace_id: namespace.id,
creator: current_user,
visibility_level: repo["visibility_level"], visibility_level: repo["visibility_level"],
import_type: "gitlab", import_type: "gitlab",
import_source: repo["path_with_namespace"], import_source: repo["path_with_namespace"],
import_url: repo["http_url_to_repo"].sub("://", "://oauth2:#{current_user.gitlab_access_token}@") import_url: repo["http_url_to_repo"].sub("://", "://oauth2:#{current_user.gitlab_access_token}@")
) ).execute
if @project.save!
@project.reload
if @project.import_failed?
@project.import_retry
else
@project.import_start
end
end
@project
end end
end end
end end
......
...@@ -10,29 +10,16 @@ module Gitlab ...@@ -10,29 +10,16 @@ module Gitlab
end end
def execute def execute
@project = Project.new( ::Projects::CreateService.new(current_user,
name: repo.name, name: repo.name,
path: repo.path, path: repo.path,
description: repo.description, description: repo.description,
namespace: namespace, namespace_id: namespace.id,
creator: current_user,
visibility_level: Gitlab::VisibilityLevel::PUBLIC, visibility_level: Gitlab::VisibilityLevel::PUBLIC,
import_type: "gitorious", import_type: "gitorious",
import_source: repo.full_name, import_source: repo.full_name,
import_url: repo.import_url import_url: repo.import_url
) ).execute
if @project.save!
@project.reload
if @project.import_failed?
@project.import_retry
else
@project.import_start
end
end
@project
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment