Commit 3c3b933c authored by Valery Sizov's avatar Valery Sizov

Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ee into ce_upstream

parents 4b1fd05a 8f8ea9fe
v 8.4.0 (unreleased)
- Add ability to create a note for user by admin
- Fix "Commit was rejected by git hook", when max_file_size was set null in project's Git hooks
v 8.3.0
- License information can now be retrieved via the API
......
......@@ -2,6 +2,7 @@ class GitHook < ActiveRecord::Base
belongs_to :project
validates :project, presence: true, unless: "is_sample?"
validates :max_file_size, numericality: { greater_than_or_equal_to: 0, only_integer: true }
def commit_validation?
commit_message_regex.present? ||
......
......@@ -2,7 +2,7 @@
%h3.page-title
Pre-defined git hooks.
%p.light
Rules that define what git pushes are accepted for a project. All newly created projects will use this settings. Request new rules for free by creating an issue on the <a href="https://gitlab.com/gitlab-org/gitlab-ee/issues/">GitLab EE issue tracker</a> and labeling it 'Feature proposal'.
Rules that define what git pushes are accepted for a project. All newly created projects will use this settings. Request new rules for free by creating an issue on the <a href="https://gitlab.com/gitlab-org/gitlab-ee/issues/">GitLab EE issue tracker</a> and labeling it 'Feature proposal'. Or if you can please contribute a tested merge request.
%hr.clearfix
......
......@@ -2,7 +2,7 @@
%h3.page-title
Git hooks
%p.light
Rules that define what git pushes are accepted for this project. Request new rules for free by creating an issue on the <a href="https://gitlab.com/gitlab-org/gitlab-ee/issues/">GitLab EE issue tracker</a> and labeling it 'Feature proposal'.
Rules that define what git pushes are accepted for this project. Request new rules for free by creating an issue on the <a href="https://gitlab.com/gitlab-org/gitlab-ee/issues/">GitLab EE issue tracker</a> and labeling it 'Feature proposal'. Or if you can please contribute a tested merge request.
%hr.clearfix
......
......@@ -57,7 +57,6 @@
- if issuable.respond_to?(:weight)
.form-group
= f.label :label_ids, class: 'control-label' do
= icon('magnet')
Weight
.col-sm-10
= f.select :weight, projects_weight_options(issuable.weight), { include_blank: true },
......
class ChangeMaxFileSizeToNotNullOnGitHooks < ActiveRecord::Migration
def change
change_column_null :git_hooks, :max_file_size, false, 0
end
end
This diff is collapsed.
......@@ -7,5 +7,6 @@ describe GitHook do
describe "Validation" do
it { should validate_presence_of(:project) }
it { should validate_numericality_of(:max_file_size).is_greater_than_or_equal_to(0).only_integer }
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