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) v 8.4.0 (unreleased)
- Add ability to create a note for user by admin - 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 v 8.3.0
- License information can now be retrieved via the API - License information can now be retrieved via the API
......
...@@ -2,6 +2,7 @@ class GitHook < ActiveRecord::Base ...@@ -2,6 +2,7 @@ class GitHook < ActiveRecord::Base
belongs_to :project belongs_to :project
validates :project, presence: true, unless: "is_sample?" validates :project, presence: true, unless: "is_sample?"
validates :max_file_size, numericality: { greater_than_or_equal_to: 0, only_integer: true }
def commit_validation? def commit_validation?
commit_message_regex.present? || commit_message_regex.present? ||
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
%h3.page-title %h3.page-title
Pre-defined git hooks. Pre-defined git hooks.
%p.light %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 %hr.clearfix
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
%h3.page-title %h3.page-title
Git hooks Git hooks
%p.light %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 %hr.clearfix
......
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
- if issuable.respond_to?(:weight) - if issuable.respond_to?(:weight)
.form-group .form-group
= f.label :label_ids, class: 'control-label' do = f.label :label_ids, class: 'control-label' do
= icon('magnet')
Weight Weight
.col-sm-10 .col-sm-10
= f.select :weight, projects_weight_options(issuable.weight), { include_blank: true }, = 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 ...@@ -7,5 +7,6 @@ describe GitHook do
describe "Validation" do describe "Validation" do
it { should validate_presence_of(:project) } 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
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