Redmine issue names have a maximum length of 255 characters. When we prepend,
e.g., "nautilus: " to a very long issue name, we can end up with a string that
is over 255 characters long. Such a string will be refused by Redmine:
ValidationError: Subject is too long (maximum is 255 characters)
This patch avoids such an eventuality by truncating the post-prepend string to
255 characters.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
logging.error(url(issue) + " requires backport to " +
"unknown release " + release)
break
- subject = release + ": " + issue['subject']
+ subject = (release + ": " + issue['subject'])[:255]
if dry_run:
logging.info(url(issue) + " add backport to " + release)
continue