<?php
$config->repo->form->createTag = array();
$config->repo->form->createTag['codeRepo'] = array('required' => true, 'type' => 'int');
$config->repo->form->createTag['tagName']  = array('required' => true, 'type' => 'string', 'filter' => 'trim');
$config->repo->form->createTag['tagFrom']  = array('required' => true, 'type' => 'string', 'filter' => 'trim');
$config->repo->form->createTag['comment']  = array('required' => true, 'type' => 'string', 'filter' => 'trim');

$config->repo->form->createWebhook = array();
$config->repo->form->createWebhook['name']         = array('required' => true, 'type' => 'string', 'default' => '', 'filter' => 'trim');
$config->repo->form->createWebhook['targetURL']    = array('required' => true, 'type' => 'string', 'default' => '', 'filter' => 'trim');
$config->repo->form->createWebhook['SSL']          = array('required' => false, 'type' => 'array');
$config->repo->form->createWebhook['key']          = array('required' => false, 'type' => 'string', 'default' => '', 'filter' => 'trim');
$config->repo->form->createWebhook['triggerEvent'] = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->createWebhook['customEvent']  = array('required' => false, 'type' => 'array', 'default' => array());
$config->repo->form->createWebhook['desc']         = array('required' => false, 'type' => 'text', 'default' => '');

$config->repo->form->editWebhook = $config->repo->form->createWebhook;

$config->repo->form->rule = array();
$config->repo->form->rule['name']                         = array('required' => true, 'type' => 'string', 'default' => '', 'filter' => 'trim');
$config->repo->form->rule['desc']                         = array('required' => false, 'type' => 'string', 'default' => '', 'filter' => 'trim');
$config->repo->form->rule['default']                      = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['bypass']                       = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['include']                      = array('required' => false, 'type' => 'string', 'default' => '', 'filter' => 'trim');
$config->repo->form->rule['exclude']                      = array('required' => false, 'type' => 'string', 'default' => '', 'filter' => 'trim');
$config->repo->form->rule['update_forbidden']             = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['create_forbidden']             = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['delete_forbidden']             = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['require_minimum_count']        = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['require_code_owners']          = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['require_latest_commit']        = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['require_no_change_request']    = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['require_resolve_all']          = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['require_identifiers']          = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['strategies_allowed']           = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['delete_branch']                = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['require_minimum_count']        = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['require_minimum_count_number'] = array('required' => false, 'type' => 'int', 'default' => 0);
$config->repo->form->rule['pipeline']                     = array('required' => false, 'type' => 'array', 'default' => array());
$config->repo->form->rule['mergeType']                    = array('required' => false, 'type' => 'array', 'default' => array());
$config->repo->form->rule['user']                         = array('required' => false, 'type' => 'array', 'default' => array());

$config->repo->form->editRule = $config->repo->form->rule;
