Commit e1bb095d authored by Phil Hughes's avatar Phil Hughes
parent 75136cc0
- page_title "Git Hooks"
%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'. Or if you can please contribute a tested merge request.
%hr.clearfix
.row.prepend-top-default.append-bottom-default
.col-lg-3
%h4.prepend-top-0
= page_title
%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'. Or if you can please contribute a tested merge request.
.col-lg-9
%h5.prepend-top-0
Add new web hook
= form_for [@project.namespace.becomes(Namespace), @project, @git_hook] do |f|
= form_errors(@git_hook)
= form_for [@project.namespace.becomes(Namespace), @project, @git_hook], html: { class: 'form-horizontal' } do |f|
-if @git_hook.errors.any?
.alert.alert-danger
- @git_hook.errors.full_messages.each do |msg|
%p= msg
= render "shared/git_hooks_form", f: f
= render "shared/git_hooks_form", f: f
.form-group
.col-sm-offset-2.col-sm-10
.checkbox
= f.label :deny_delete_tag do
= f.check_box :deny_delete_tag
%strong
Do not allow users to remove git tags with
%code git push
.help-block Tags can still be deleted through the web UI.
= f.check_box :deny_delete_tag, class: "pull-left"
.prepend-left-20
= f.label :deny_delete_tag, class: "label-light append-bottom-0" do
Do not allow users to remove git tags with
%code git push
%p.light.append-bottom-0
Tags can still be deleted through the web UI.
.form-group
.col-sm-offset-2.col-sm-10
.checkbox
= f.label :member_check do
= f.check_box :member_check
%strong
Check whether author is a GitLab user
.help-block Restrict commits by author (email) to existing GitLab users
= f.check_box :member_check, class: "pull-left"
.prepend-left-20
= f.label :member_check, "Check whether author is a GitLab user", class: "label-light append-bottom-0"
%p.light.append-bottom-0
Restrict commits by author (email) to existing GitLab users
.form-group
= f.label :commit_message_regex, "Commit message", class: 'control-label'
.col-sm-10
= f.text_field :commit_message_regex, class: "form-control", placeholder: 'Example: Fixes \d+\..*'
.help-block
All commit messages must match this
= link_to 'Ruby regular expression', 'http://www.ruby-doc.org/core-2.1.1/Regexp.html'
to be pushed.
If this field is empty it allows any commit message.
For example you can require that an issue number is always mentioned in the commit message.
= f.label :commit_message_regex, "Commit message", class: 'label-light'
= f.text_field :commit_message_regex, class: "form-control", placeholder: 'Example: Fixes \d+\..*'
.help-block
All commit messages must match this
= link_to 'Ruby regular expression', 'http://www.ruby-doc.org/core-2.1.1/Regexp.html'
to be pushed.
If this field is empty it allows any commit message.
For example you can require that an issue number is always mentioned in the commit message.
.form-group
= f.label :author_email_regex, "Commit author's email", class: 'control-label'
.col-sm-10
= f.text_field :author_email_regex, class: "form-control", placeholder: 'Example: Fixes @my-company.com$'
.help-block
All commit author's email must match this
= link_to 'Ruby regular expression', 'http://www.ruby-doc.org/core-2.1.1/Regexp.html'
to be pushed.
If this field is empty it allows any email.
= f.label :author_email_regex, "Commit author's email", class: 'label-light'
= f.text_field :author_email_regex, class: "form-control", placeholder: 'Example: Fixes @my-company.com$'
.help-block
All commit author's email must match this
= link_to 'Ruby regular expression', 'http://www.ruby-doc.org/core-2.1.1/Regexp.html'
to be pushed.
If this field is empty it allows any email.
.form-group
= f.label :file_name_regex, "Prohibited file names", class: 'control-label'
.col-sm-10
= f.text_field :file_name_regex, class: "form-control", placeholder: 'Example: (jar|exe)$'
.help-block
All commited filenames must not match this
= link_to 'Ruby regular expression', 'http://www.ruby-doc.org/core-2.1.1/Regexp.html'
to be pushed.
If this field is empty it allows any filenames.
= f.label :file_name_regex, "Prohibited file names", class: 'label-light'
= f.text_field :file_name_regex, class: "form-control", placeholder: 'Example: (jar|exe)$'
.help-block
All commited filenames must not match this
= link_to 'Ruby regular expression', 'http://www.ruby-doc.org/core-2.1.1/Regexp.html'
to be pushed.
If this field is empty it allows any filenames.
.form-group
= f.label :max_file_size, "Maximum file size (MB)", class: 'control-label'
.col-sm-10
= f.number_field :max_file_size, class: "form-control", min: 0
.help-block
Pushes that contain added or updated files that exceed this file size are rejected.
Set to 0 to allow files of any size.
= f.label :max_file_size, "Maximum file size (MB)", class: 'label-light'
= f.number_field :max_file_size, class: "form-control", min: 0
.help-block
Pushes that contain added or updated files that exceed this file size are rejected.
Set to 0 to allow files of any size.
.form-actions
= f.submit "Save Git hooks", class: "btn btn-create"
\ No newline at end of file
= f.submit "Save Git hooks", class: "btn btn-create"
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