<commit_before>import hlib.input
import hlib.issues

import handlers

from hlib.api import api
from hlib.input import validate_by, SchemaValidator

from handlers import page, require_login

import hruntime

class Handler(handlers.GenericHandler):
  @require_login
  @page
  def index(self):
    return self.generate('issues.mako')

  class ValidateCreate(SchemaValidator):
    title = hlib.input.CommonString()
    body = hlib.input.CommonString()

  @require_login
  @validate_by(schema = ValidateCreate)
  @api
  def create(self, title = None, body = None):
    body = (u'Reported by: %s\n\n' % hruntime.user.name) + body

    repo = hlib.issues.Repository(hruntime.app.config['issues']['token'], hruntime.app.config['issues']['repository'])
    repo.create_new_issue(title, body)
<commit_msg>Name reporter alson in title of reported issue<commit_after>import hlib.input
import hlib.issues

import handlers

from hlib.api import api
from hlib.input import validate_by, SchemaValidator

from handlers import page, require_login

import hruntime

class Handler(handlers.GenericHandler):
  @require_login
  @page
  def index(self):
    return self.generate('issues.mako')

  class ValidateCreate(SchemaValidator):
    title = hlib.input.CommonString()
    body = hlib.input.CommonString()

  @require_login
  @validate_by(schema = ValidateCreate)
  @api
  def create(self, title = None, body = None):
    title = title + (u' (%s)' % hruntime.user.name)
    body = (u'Reported by: %s\n\n' % hruntime.user.name) + body

    repo = hlib.issues.Repository(hruntime.app.config['issues']['token'], hruntime.app.config['issues']['repository'])
    repo.create_new_issue(title, body)

{'fraction_non_alphanumeric': 0.1182089552238806, 'fraction_numerical': 0.0, 'mean_word_length': 4.700680272108843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5411919', 'n_tokens_mistral': 535, 'n_tokens_neox': 524, 'n_words': 126}