<commit_before><?php

namespace JF\GitHubBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

/**
 * @Route("/github")
 * @Template()
 */
class DefaultController extends Controller {

    use \Ephp\ACLBundle\Controller\Traits\NotifyController,
        \Ephp\UtilityBundle\Controller\Traits\BaseController;

    /**
     * @Route("/webhook", defaults={"_format": "josn"})
     * @Method("POST")
     */
    public function indexAction() {
        $request = $this->getRequest();
        
        $user = $this->find('JFACLBundle:Gestore', 1);
        $json = json_decode(str_replace('payload=', '', urldecode($request->getContent())));
        $out = array(
            'type' => $json,
            'content' => $json->ref,
        );
        $this->notify($user, 'Test GitHub', 'JFGitHubBundle:email:test', $out);<commit_msg>test github 9<commit_after><?php

namespace JF\GitHubBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

/**
 * @Route("/github")
 * @Template()
 */
class DefaultController extends Controller {

    use \Ephp\ACLBundle\Controller\Traits\NotifyController,
        \Ephp\UtilityBundle\Controller\Traits\BaseController;

    /**
     * @Route("/webhook", defaults={"_format": "josn"})
     * @Method("POST")
     */
    public function indexAction() {
        $request = $this->getRequest();
        
        $user = $this->find('JFACLBundle:Gestore', 1);
        $json = json_decode(str_replace('payload=', '', urldecode($request->getContent())));
        $out = array(
            'type' => $json,
            'content' => $json->ref,
        );
        
        $this->notify($user, 'Test GitHub', 'JFGitHubBundle:email:test', $out);
{'fraction_non_alphanumeric': 0.15776815776815778, 'fraction_numerical': 0.001443001443001443, 'mean_word_length': 3.4827586206896552, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 17, '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': '2270055', 'n_tokens_mistral': 631, 'n_tokens_neox': 616, 'n_words': 93}