<commit_before><?php

namespace Controller;

/**
 * Automatic actions management
 *
 * @package controller
 * @author  <NAME>
 */
class Action extends Base
{
    /**
     * List of automatic actions for a given project
     *
     * @access public
     */
    public function index()
    {
        $project_id = $this->request->getIntegerParam('project_id');
        $project = $this->project->getById($project_id);

        if (! $project) {
            $this->session->flashError(t('Project not found.'));
            $this->response->redirect('?controller=project');
        }

        $this->response->html($this->template->layout('action_index', array(
            'values' => array('project_id' => $project['id']),
            'project' => $project,
            'actions' => $this->action->getAllByProject($project['id']),
            'available_actions' => $this->action->getAvailableActions(),
            'available_events' => $this->action->getAvailableEvents(),
            'available_params' => $this->action->getAllActionParameters(),
            'columns_list' => $this->board->getColumnsList($project['id']),
            'users_list' => $this->project->getUsersList($project['id'], false),
            'projects_list' => $this->project->getList(false),
            'colors_list' => $this->task->getColors(),
            'categories_list' => $this->category->getList($project['id'], false),
            'menu' => 'projects',
            'title' => t('Automatic actions')
        )));
    }

    /**
     * Define action parameters (step 2)
     *
     * @access public
     */
    public function params()
    {
        $project_id = $this->request->getIntegerParam('project_id');
        $project = $this->project->getById($project_id);

        if (! $project) {
            $this->session->flashError(t('Project not found.'));
            $this->response->redirect('?controller=project');
        }

        $values = $this->request->getValues();
        $action = $this->action->load($values['action_name'], $values['project_id']);

        $this->response->html($this->template->layout('action_params', array(
            'values' => $values,
            'action_params' => $action->getActionRequiredParameters(),
            'columns_list' => $this->board->getColumnsList($project['id']),
            'users_list' => $this->project->getUsersList($project['id'], false),
            'projects_list' => $this->project->getList(false),
            'colors_list' => $this->task->getColors(),
            'categories_list' => $this->category->getList($project['id'], false),
            'project' => $project,<commit_msg>Allow 'no category' and 'unassigned' in actions.<commit_after><?php

namespace Controller;

/**
 * Automatic actions management
 *
 * @package controller
 * @author  <NAME>
 */
class Action extends Base
{
    /**
     * List of automatic actions for a given project
     *
     * @access public
     */
    public function index()
    {
        $project_id = $this->request->getIntegerParam('project_id');
        $project = $this->project->getById($project_id);

        if (! $project) {
            $this->session->flashError(t('Project not found.'));
            $this->response->redirect('?controller=project');
        }

        $this->response->html($this->template->layout('action_index', array(
            'values' => array('project_id' => $project['id']),
            'project' => $project,
            'actions' => $this->action->getAllByProject($project['id']),
            'available_actions' => $this->action->getAvailableActions(),
            'available_events' => $this->action->getAvailableEvents(),
            'available_params' => $this->action->getAllActionParameters(),
            'columns_list' => $this->board->getColumnsList($project['id']),
            'users_list' => $this->project->getUsersList($project['id']),
            'projects_list' => $this->project->getList(false),
            'colors_list' => $this->task->getColors(),
            'categories_list' => $this->category->getList($project['id']),
            'menu' => 'projects',
            'title' => t('Automatic actions')
        )));
    }

    /**
     * Define action parameters (step 2)
     *
     * @access public
     */
    public function params()
    {
        $project_id = $this->request->getIntegerParam('project_id');
        $project = $this->project->getById($project_id);

        if (! $project) {
            $this->session->flashError(t('Project not found.'));
            $this->response->redirect('?controller=project');
        }

        $values = $this->request->getValues();
        $action = $this->action->load($values['action_name'], $values['project_id']);

        $this->response->html($this->template->layout('action_params', array(
            'values' => $values,
            'action_params' => $action->getActionRequiredParameters(),
            'columns_list' => $this->board->getColumnsList($project['id']),
            'users_list' => $this->project->getUsersList($project['id']),
            'projects_list' => $this->project->getList(false),
            'colors_list' => $this->task->getColors(),
            'categories_list' => $this->category->getList($project['id']),
            'project' => $project,
{'fraction_non_alphanumeric': 0.18507293047925744, 'fraction_numerical': 0.00037885963250615644, 'mean_word_length': 2.661581137309293, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 163, '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': '4088184', 'n_tokens_mistral': 1459, 'n_tokens_neox': 1448, 'n_words': 229}