mirror of https://github.com/zulip/zulip.git
Include the trac summary in the Humbug subject.
(imported from commit 23298d8455e2b0e8c4947f2d2e76874b66a8e28c)
This commit is contained in:
parent
212a4e76d4
commit
b9c54ed6f2
|
@ -29,8 +29,13 @@ def markdown_ticket_url(ticket, heading="ticket"):
|
|||
def markdown_block(desc):
|
||||
return "\n\n>" + "\n> ".join(desc.split("\n")) + "\n"
|
||||
|
||||
def truncate(string, length):
|
||||
if len(string) <= length:
|
||||
return string
|
||||
return string[:length - 3] + "..."
|
||||
|
||||
def trac_subject(ticket):
|
||||
return "Trac #%s" % ticket.id
|
||||
return truncate("Trac #%s: %s" % (ticket.id, ticket.values.get("summary")), 60)
|
||||
|
||||
def send_update(ticket, content):
|
||||
client.send_message({
|
||||
|
|
Loading…
Reference in New Issue