<?php
define('TABLE_DEVOPS_ACTION', '`' . $config->db->prefix . 'devops_action`');
define('TABLE_GITFOXSYNCLOG', '`' . $config->db->prefix . 'gitfoxsynclog`');
define('TABLE_ENV', '`' . $config->db->prefix . 'env`');
define('TABLE_TEMPLATE', '`' . $config->db->prefix . 'template`');
define('TABLE_CLUSTER', '`' . $config->db->prefix . 'cluster`');

$config->fit = new stdclass();
$config->fit->version = '0.3.11';

$filter->repo->addbug  = new stdclass();
$filter->repo->addbug->get['file'] = 'reg::base64';

$config->routes['/gitfox/webhook']   = 'gitfoxWebhook';
$config->routes['/instance/monitor'] = 'instanceMonitor';

$config->logonMethods[] = 'gitfox.create';
$config->logonMethods[] = 'gitfox.edit';
$config->logonMethods[] = 'gitfox.binduser';
$config->logonMethods[] = 'build.linkartifact';
$config->logonMethods[] = 'build.artifacttree';
$config->logonMethods[] = 'build.unlinkartifact';
$config->logonMethods[] = 'build.download';
$config->logonMethods[] = 'build.copycommand';
$config->logonMethods[] = 'release.download';
$config->logonMethods[] = 'repo.viewwebhookrequest';
$config->logonMethods[] = 'pullreq.commitlogs';
$config->logonMethods[] = 'pullreq.link';
$config->logonMethods[] = 'pullreq.diff';
$config->logonMethods[] = 'job.editpipeline';
$config->logonMethods[] = 'job.deletepipeline';
$config->logonMethods[] = 'deploy.artifact';
$config->logonMethods[] = 'codescan.refresh';
$config->logonMethods[] = 'codescan.tips';

$config->objectTables['gitfox']          = TABLE_PIPELINE;
$config->objectTables['spug']            = TABLE_PIPELINE;
$config->objectTables['pullreq']         = TABLE_MR;
$config->objectTables['env']             = TABLE_ENV;
$config->objectTables['publishtemplate'] = TABLE_TEMPLATE;
$config->objectTables['cluster']         = TABLE_CLUSTER;
$config->objectTables['appmarket']       = TABLE_PIPELINE;

$filter->bug->batchcreate->cookie['issueIdList']      = 'reg::any';

$filter->codescan = new stdclass();
$filter->codescan->issue       = new stdclass();
$filter->codescan->ignoreissue = new stdclass();
$filter->codescan->issue->cookie['issueFile']         = 'string';
$filter->codescan->ignoreissue->cookie['issueIdList'] = 'reg::any';

$filter->codescan->taskview = new stdclass();
$filter->codescan->taskview->cookie['scanIssueUrlParams'] = 'string';

if(!isset($filter->artifactrepo)) $filter->artifactrepo = new stdclass();
if(!isset($filter->artifactrepo->default)) $filter->artifactrepo->default = new stdclass();
$filter->artifactrepo->default->cookie['artifactPath'] = 'string';
$filter->artifactrepo->default->cookie['artifactDir']  = 'string';

if(!isset($filter->build)) $filter->build = new stdclass();
if(!isset($filter->build->default)) $filter->build->default = new stdclass();
$filter->build->default->cookie['artifactDir'] = 'string';
