<commit_before>%h3.page-title
  Web hooks

%p.light
  #{link_to "Web hooks ", help_web_hooks_path, class: "vlink"} can be
  used for binding events when something happends to the the project.

%hr.clearfix

= form_for [@project, @hook], as: :hook, url: project_hooks_path(@project), html: { class: 'form-inline' } do |f|
  -if @hook.errors.any?
    .alert.alert-error
      - @hook.errors.full_messages.each do |msg|
        %p= msg
  .control-group
    = f.label :url, "URL"
    .controls
      = f.text_field :url, class: "text_field input-xxlarge input-xpadding", placeholder: 'http://example.com/trigger-ci.json'
      &nbsp;
      = f.submit "Add Web Hook", class: "btn btn-create"
  .control-group
    = f.label :url, "Trigger"
    .controls
      %div
        = f.check_box :push_events, class: 'pull-left'
        .prepend-left-20
          = f.label :push_events, class: 'list-label' do
            %strong Push events
          %p.light
            This url will be triggered in case of push to repository
      %div
        = f.check_box :issues_events, class: 'pull-left'
        .prepend-left-20
          = f.label :issues_events, class: 'list-label' do
            %strong Issues events
          %p.light
            This url will be triggered for created issues
      %div
        = f.check_box :merge_requests_events, class: 'pull-left'
        .prepend-left-20
          = f.label :merge_requests_events, class: 'list-label' do
            %strong Merge Request events
          %p.light
            This url will be triggered for created merge requests
%hr

-if @hooks.any?
  .ui-box
    .title
      Web Hooks (#{@hooks.count})
    %ul.well-list
      - @hooks.each do |hook|
        %li
          .pull-right
            = link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small grouped"
            = link_to 'Remove', project_hook_path(@project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-small grouped"
          .clearfix
            %span.monospace= hook.url
          %p
            - %w(push_events issues_events merge_requests_events).each do |trigger|
              - if hook.send(trigger)
                %span.label.label-gray= trigger.titleize<commit_msg>Fix header case<commit_after>%h3.page-title
  Web hooks

%p.light
  #{link_to "Web hooks ", help_web_hooks_path, class: "vlink"} can be
  used for binding events when something happends to the the project.

%hr.clearfix

= form_for [@project, @hook], as: :hook, url: project_hooks_path(@project), html: { class: 'form-inline' } do |f|
  -if @hook.errors.any?
    .alert.alert-error
      - @hook.errors.full_messages.each do |msg|
        %p= msg
  .control-group
    = f.label :url, "URL"
    .controls
      = f.text_field :url, class: "text_field input-xxlarge input-xpadding", placeholder: 'http://example.com/trigger-ci.json'
      &nbsp;
      = f.submit "Add Web Hook", class: "btn btn-create"
  .control-group
    = f.label :url, "Trigger"
    .controls
      %div
        = f.check_box :push_events, class: 'pull-left'
        .prepend-left-20
          = f.label :push_events, class: 'list-label' do
            %strong Push events
          %p.light
            This url will be triggered in case of push to repository
      %div
        = f.check_box :issues_events, class: 'pull-left'
        .prepend-left-20
          = f.label :issues_events, class: 'list-label' do
            %strong Issues events
          %p.light
            This url will be triggered for created issues
      %div
        = f.check_box :merge_requests_events, class: 'pull-left'
        .prepend-left-20
          = f.label :merge_requests_events, class: 'list-label' do
            %strong Merge Request events
          %p.light
            This url will be triggered for created merge requests
%hr

-if @hooks.any?
  .ui-box
    .title
      Web hooks (#{@hooks.count})
    %ul.well-list
      - @hooks.each do |hook|
        %li
          .pull-right
            = link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small grouped"
            = link_to 'Remove', project_hook_path(@project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-small grouped"
          .clearfix
            %span.monospace= hook.url
          %p
            - %w(push_events issues_events merge_requests_events).each do |trigger|
              - if hook.send(trigger)
                %span.label.label-gray= trigger.titleize
{'fraction_non_alphanumeric': 0.11814159292035398, 'fraction_numerical': 0.003097345132743363, 'mean_word_length': 2.199575371549894, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1445265', 'n_tokens_mistral': 1434, 'n_tokens_neox': 1427, 'n_words': 393}