Private GIT

Skip to content
Snippets Groups Projects
Commit dca70640 authored by Alexandre Beloin's avatar Alexandre Beloin
Browse files

Merge pull request #1543 from abeloin/patch-title_len

Submit: Limit the title to 1024 chars.
parents a8060c43 703d6c6d
No related merge requests found
...@@ -178,6 +178,11 @@ class Logger(object): ...@@ -178,6 +178,11 @@ class Logger(object):
if not curError.title: if not curError.title:
continue continue
if len(curError.title) > 1024:
title_Error = str(curError.title[0:1024])
else:
title_Error = str(curError.title)
gist = None gist = None
regex = "^(%s)\s*([A-Z]+)\s*(.+?)\s*\:\:\s*(.*)$" % curError.time regex = "^(%s)\s*([A-Z]+)\s*(.+?)\s*\:\:\s*(.*)$" % curError.time
for i, x in enumerate(log_data): for i, x in enumerate(log_data):
...@@ -214,7 +219,7 @@ class Logger(object): ...@@ -214,7 +219,7 @@ class Logger(object):
message += u"---\n" message += u"---\n"
message += u"_STAFF NOTIFIED_: @SiCKRAGETV/owners @SiCKRAGETV/moderators" message += u"_STAFF NOTIFIED_: @SiCKRAGETV/owners @SiCKRAGETV/moderators"
issue = gh.get_organization(gh_org).get_repo(gh_repo).create_issue("[APP SUBMITTED]: " + str(curError.title), message) issue = gh.get_organization(gh_org).get_repo(gh_repo).create_issue("[APP SUBMITTED]: " + title_Error, message)
if issue: if issue:
self.log('Your issue ticket #%s was submitted successfully!' % issue.number) self.log('Your issue ticket #%s was submitted successfully!' % issue.number)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment