mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-27 13:36:06 +10:00
Merge branch 'cherry-pick-robert' into '7-11-stable'
Cherrypicks for 7.11 See merge request !1826
This commit is contained in:
@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
|
||||
|
||||
v 7.11.0 (unreleased)
|
||||
- Fall back to Plaintext when Syntaxhighlighting doesn't work. Fixes some buggy lexers (Hannes Rosenögger)
|
||||
- Get editing comments to work in Chrome 43 again.
|
||||
- Fix broken view when viewing history of a file that includes a path that used to be another file (Stan Hu)
|
||||
- Don't show duplicate deploy keys
|
||||
- Fix commit time being displayed in the wrong timezone in some cases (Hannes Rosenögger)
|
||||
@@ -67,6 +68,7 @@ v 7.11.0 (unreleased)
|
||||
- Add style for <kbd> element in markdown
|
||||
- Spin spinner icon next to "Checking for CI status..." on MR page.
|
||||
- Fix reference links in dashboard activity and ATOM feeds.
|
||||
- Ensure that the first added admin performs repository imports
|
||||
|
||||
v 7.10.2
|
||||
- Fix CI links on MR page
|
||||
|
||||
@@ -44,7 +44,7 @@ gem "browser"
|
||||
|
||||
# Extracting information from a git repository
|
||||
# Provide access to Gitlab::Git library
|
||||
gem "gitlab_git", '~> 7.1.12'
|
||||
gem "gitlab_git", '~> 7.1.13'
|
||||
|
||||
# Ruby/Rack Git Smart-HTTP Server Handler
|
||||
gem 'gitlab-grack', '~> 2.0.2', require: 'grack'
|
||||
|
||||
+4
-4
@@ -225,11 +225,11 @@ GEM
|
||||
mime-types (~> 1.19)
|
||||
gitlab_emoji (0.1.0)
|
||||
gemojione (~> 2.0)
|
||||
gitlab_git (7.1.12)
|
||||
gitlab_git (7.1.13)
|
||||
activesupport (~> 4.0)
|
||||
charlock_holmes (~> 0.6)
|
||||
gitlab-linguist (~> 3.0)
|
||||
rugged (~> 0.21.2)
|
||||
rugged (~> 0.22.2)
|
||||
gitlab_meta (7.0)
|
||||
gitlab_omniauth-ldap (1.2.1)
|
||||
net-ldap (~> 0.9)
|
||||
@@ -530,7 +530,7 @@ GEM
|
||||
sexp_processor (~> 4.1)
|
||||
rubyntlm (0.5.0)
|
||||
rubypants (0.2.0)
|
||||
rugged (0.21.4)
|
||||
rugged (0.22.2)
|
||||
rugments (1.0.0.beta6)
|
||||
safe_yaml (0.9.7)
|
||||
sanitize (2.1.0)
|
||||
@@ -723,7 +723,7 @@ DEPENDENCIES
|
||||
gitlab-grack (~> 2.0.2)
|
||||
gitlab-linguist (~> 3.0.1)
|
||||
gitlab_emoji (~> 0.1)
|
||||
gitlab_git (~> 7.1.12)
|
||||
gitlab_git (~> 7.1.13)
|
||||
gitlab_meta (= 7.0)
|
||||
gitlab_omniauth-ldap (= 1.2.1)
|
||||
gollum-lib (~> 4.0.2)
|
||||
|
||||
@@ -312,6 +312,14 @@ class @Notes
|
||||
form.show()
|
||||
textarea = form.find("textarea")
|
||||
textarea.focus()
|
||||
|
||||
# HACK (rspeicher/DouweM): Work around a Chrome 43 bug(?).
|
||||
# The textarea has the correct value, Chrome just won't show it unless we
|
||||
# modify it, so let's clear it and re-set it!
|
||||
value = textarea.val()
|
||||
textarea.val ""
|
||||
textarea.val value
|
||||
|
||||
disableButtonIfEmptyField textarea, form.find(".js-comment-button")
|
||||
|
||||
###
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
xml.instruct!
|
||||
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
|
||||
xml.title "#{current_user.name} issues"
|
||||
xml.link href: issues_dashboard_url(format: :atom, private_token: current_user.private_token), rel: "self", type: "application/atom+xml"
|
||||
xml.link href: issues_dashboard_url(format: :atom, private_token: current_user.try(:private_token)), rel: "self", type: "application/atom+xml"
|
||||
xml.link href: issues_dashboard_url, rel: "alternate", type: "text/html"
|
||||
xml.id issues_dashboard_url
|
||||
xml.updated @issues.first.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") if @issues.any?
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
xml.instruct!
|
||||
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
|
||||
xml.title "Activity"
|
||||
xml.link href: dashboard_url(format: :atom, private_token: current_user.private_token), rel: "self", type: "application/atom+xml"
|
||||
xml.link href: dashboard_url(format: :atom, private_token: current_user.try(:private_token)), rel: "self", type: "application/atom+xml"
|
||||
xml.link href: dashboard_url, rel: "alternate", type: "text/html"
|
||||
xml.id dashboard_url
|
||||
xml.updated @events.maximum(:updated_at).strftime("%Y-%m-%dT%H:%M:%SZ") if @events.any?
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
%i
|
||||
at
|
||||
= commit[:timestamp].to_time.to_s(:short)
|
||||
%blockquote= markdown(escape_once(commit[:message]), xhtml: true, reference_only_path: false, project: note.project)
|
||||
%blockquote= markdown(escape_once(commit[:message]), xhtml: true, reference_only_path: false, project: event.project)
|
||||
- if event.commits_count > 15
|
||||
%p
|
||||
%i
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
xml.instruct!
|
||||
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
|
||||
xml.title "#{@group.name} activity"
|
||||
xml.link href: group_url(@group, format: :atom, private_token: current_user.private_token), rel: "self", type: "application/atom+xml"
|
||||
xml.link href: group_url(@group, format: :atom, private_token: current_user.try(:private_token)), rel: "self", type: "application/atom+xml"
|
||||
xml.link href: group_url(@group), rel: "alternate", type: "text/html"
|
||||
xml.id group_url(@group)
|
||||
xml.updated @events.maximum(:updated_at).strftime("%Y-%m-%dT%H:%M:%SZ") if @events.any?
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
xml.instruct!
|
||||
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
|
||||
xml.title "#{@project.name}:#{@ref} commits"
|
||||
xml.link href: namespace_project_commits_url(@project.namespace, @project, @ref, format: :atom, private_token: current_user.private_token), rel: "self", type: "application/atom+xml"
|
||||
xml.link href: namespace_project_commits_url(@project.namespace, @project, @ref, format: :atom, private_token: current_user.try(:private_token)), rel: "self", type: "application/atom+xml"
|
||||
xml.link href: namespace_project_commits_url(@project.namespace, @project, @ref), rel: "alternate", type: "text/html"
|
||||
xml.id namespace_project_commits_url(@project.namespace, @project, @ref)
|
||||
xml.updated @commits.first.committed_date.strftime("%Y-%m-%dT%H:%M:%SZ") if @commits.any?
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
xml.instruct!
|
||||
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
|
||||
xml.title "#{@project.name} issues"
|
||||
xml.link href: namespace_project_issues_url(@project.namespace, @project, format: :atom, private_token: current_user.private_token), rel: "self", type: "application/atom+xml"
|
||||
xml.link href: namespace_project_issues_url(@project.namespace, @project, format: :atom, private_token: current_user.try(:private_token)), rel: "self", type: "application/atom+xml"
|
||||
xml.link href: namespace_project_issues_url(@project.namespace, @project), rel: "alternate", type: "text/html"
|
||||
xml.id namespace_project_issues_url(@project.namespace, @project)
|
||||
xml.updated @issues.first.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") if @issues.any?
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
xml.instruct!
|
||||
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
|
||||
xml.title "#{@project.name} activity"
|
||||
xml.link href: namespace_project_url(@project.namespace, @project, format: :atom, private_token: current_user.private_token), rel: "self", type: "application/atom+xml"
|
||||
xml.link href: namespace_project_url(@project.namespace, @project, format: :atom, private_token: current_user.try(:private_token)), rel: "self", type: "application/atom+xml"
|
||||
xml.link href: namespace_project_url(@project.namespace, @project), rel: "alternate", type: "text/html"
|
||||
xml.id namespace_project_url(@project.namespace, @project)
|
||||
xml.updated @events.maximum(:updated_at).strftime("%Y-%m-%dT%H:%M:%SZ") if @events.any?
|
||||
|
||||
@@ -28,6 +28,7 @@ EXPOSE 80 22
|
||||
|
||||
# Copy assets
|
||||
COPY assets/wrapper /usr/local/bin/
|
||||
COPY assets/gitlab.rb /etc/gitlab/
|
||||
|
||||
# Wrapper to handle signal, trigger runit and reconfigure GitLab
|
||||
CMD ["/usr/local/bin/wrapper"]
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# External URL should be your Docker instance.
|
||||
# By default, GitLab will use the Docker container hostname.
|
||||
# Always use port 80 here to force the internal nginx to bind port 80,
|
||||
# even if you intend to use another port in Docker.
|
||||
# external_url "http://192.168.59.103/"
|
||||
|
||||
# Prevent Postgres from trying to allocate 25% of total memory
|
||||
postgresql['shared_buffers'] = '1MB'
|
||||
|
||||
# Configure GitLab to redirect PostgreSQL logs to the data volume
|
||||
postgresql['log_directory'] = '/var/log/gitlab/postgresql'
|
||||
|
||||
# Some configuration of GitLab
|
||||
# You can find more at https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration
|
||||
gitlab_rails['gitlab_email_from'] = 'gitlab@example.com'
|
||||
gitlab_rails['gitlab_support_email'] = 'support@example.com'
|
||||
gitlab_rails['time_zone'] = 'Europe/Paris'
|
||||
|
||||
# SMTP settings
|
||||
# You must use an external server, the Docker container does not install an SMTP server
|
||||
gitlab_rails['smtp_enable'] = true
|
||||
gitlab_rails['smtp_address'] = "smtp.example.com"
|
||||
gitlab_rails['smtp_port'] = 587
|
||||
gitlab_rails['smtp_user_name'] = "user"
|
||||
gitlab_rails['smtp_password'] = "password"
|
||||
gitlab_rails['smtp_domain'] = "example.com"
|
||||
gitlab_rails['smtp_authentication'] = "plain"
|
||||
gitlab_rails['smtp_enable_starttls_auto'] = true
|
||||
|
||||
# Enable LDAP authentication
|
||||
# gitlab_rails['ldap_enabled'] = true
|
||||
# gitlab_rails['ldap_host'] = 'ldap.example.com'
|
||||
# gitlab_rails['ldap_port'] = 389
|
||||
# gitlab_rails['ldap_method'] = 'plain' # 'ssl' or 'plain'
|
||||
# gitlab_rails['ldap_allow_username_or_email_login'] = false
|
||||
# gitlab_rails['ldap_uid'] = 'uid'
|
||||
# gitlab_rails['ldap_base'] = 'ou=users,dc=example,dc=com'
|
||||
@@ -8,28 +8,33 @@ module Gitlab
|
||||
# Extends HTML::Pipeline::SanitizationFilter with a custom whitelist.
|
||||
class SanitizationFilter < HTML::Pipeline::SanitizationFilter
|
||||
def whitelist
|
||||
whitelist = HTML::Pipeline::SanitizationFilter::WHITELIST
|
||||
whitelist = super
|
||||
|
||||
# Allow code highlighting
|
||||
whitelist[:attributes]['pre'] = %w(class)
|
||||
whitelist[:attributes]['span'] = %w(class)
|
||||
# Only push these customizations once
|
||||
unless customized?(whitelist[:transformers])
|
||||
# Allow code highlighting
|
||||
whitelist[:attributes]['pre'] = %w(class)
|
||||
whitelist[:attributes]['span'] = %w(class)
|
||||
|
||||
# Allow table alignment
|
||||
whitelist[:attributes]['th'] = %w(style)
|
||||
whitelist[:attributes]['td'] = %w(style)
|
||||
# Allow table alignment
|
||||
whitelist[:attributes]['th'] = %w(style)
|
||||
whitelist[:attributes]['td'] = %w(style)
|
||||
|
||||
# Allow span elements
|
||||
whitelist[:elements].push('span')
|
||||
# Allow span elements
|
||||
whitelist[:elements].push('span')
|
||||
|
||||
# Remove `rel` attribute from `a` elements
|
||||
whitelist[:transformers].push(remove_rel)
|
||||
# Remove `rel` attribute from `a` elements
|
||||
whitelist[:transformers].push(remove_rel)
|
||||
|
||||
# Remove `class` attribute from non-highlight spans
|
||||
whitelist[:transformers].push(clean_spans)
|
||||
# Remove `class` attribute from non-highlight spans
|
||||
whitelist[:transformers].push(clean_spans)
|
||||
end
|
||||
|
||||
whitelist
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def remove_rel
|
||||
lambda do |env|
|
||||
if env[:node_name] == 'a'
|
||||
@@ -48,6 +53,10 @@ module Gitlab
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def customized?(transformers)
|
||||
transformers.last.source_location[0] == __FILE__
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace :gitlab do
|
||||
if project
|
||||
puts " * #{project.name} (#{repo_path}) exists"
|
||||
else
|
||||
user = User.admins.first
|
||||
user = User.admins.reorder("id").first
|
||||
|
||||
project_params = {
|
||||
name: name,
|
||||
|
||||
Reference in New Issue
Block a user