<commit_before><?php

include('include/init.php');
loadlib('wof_pipeline');

if (! users_acl_check_access($GLOBALS['cfg']['user'], 'can_view_pipelines')) {
	error_404();
}

$id = get_int64('id');
$rsp = wof_pipeline_get($id);

if (! $rsp['ok'] ||
    ! $rsp['pipeline']) {
	error_404();
}

$pipeline = $rsp['pipeline'];

$GLOBALS['smarty']->assign('pipeline_id', $id);
$GLOBALS['smarty']->assign('pipeline_type', $pipeline['type']);
$GLOBALS['smarty']->assign('pipeline_filename', $pipeline['filename']);
$GLOBALS['smarty']->assign('pipeline_phase', $pipeline['phase']);

$GLOBALS['smarty']->assign('pipeline_repo', $pipeline['meta']['repo']);
$GLOBALS['smarty']->assign('pipeline_branch', $pipeline['meta']['branch']);

$crumb_update = crumb_generate('api', 'wof.pipeline.update');
$GLOBALS['smarty']->assign("crumb_update", $crumb_update);

$rsp = wof_pipeline_log_dump($id);
if ($rsp['logs']) {
	$GLOBALS['smarty']->assign('logs', $rsp['logs']);
}

$GLOBALS['smarty']->display('page_pipeline.txt');
exit();<commit_msg>:wrench: assign the pipeline branch var<commit_after><?php

include('include/init.php');
loadlib('wof_pipeline');

if (! users_acl_check_access($GLOBALS['cfg']['user'], 'can_view_pipelines')) {
	error_404();
}

$id = get_int64('id');
$rsp = wof_pipeline_get($id);

if (! $rsp['ok'] ||
    ! $rsp['pipeline']) {
	error_404();
}

$pipeline = $rsp['pipeline'];

$GLOBALS['smarty']->assign('pipeline_id', $id);
$GLOBALS['smarty']->assign('pipeline_type', $pipeline['type']);
$GLOBALS['smarty']->assign('pipeline_filename', $pipeline['filename']);
$GLOBALS['smarty']->assign('pipeline_phase', $pipeline['phase']);

$GLOBALS['smarty']->assign('pipeline_repo', $pipeline['meta']['repo']);
$GLOBALS['smarty']->assign('pipeline_branch', "pipeline-{$pipeline['id']}");

$crumb_update = crumb_generate('api', 'wof.pipeline.update');
$GLOBALS['smarty']->assign("crumb_update", $crumb_update);

$rsp = wof_pipeline_log_dump($id);
if ($rsp['logs']) {
	$GLOBALS['smarty']->assign('logs', $rsp['logs']);
}

$GLOBALS['smarty']->display('page_pipeline.txt');
exit();
{'fraction_non_alphanumeric': 0.26051232479458675, 'fraction_numerical': 0.007733204446592557, 'mean_word_length': 10.43646408839779, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '7612716', 'n_tokens_mistral': 745, 'n_tokens_neox': 787, 'n_words': 88}