Include the trac summary in the Humbug subject.
(imported from commit 23298d8455e2b0e8c4947f2d2e76874b66a8e28c)
This commit is contained in:
		
							parent
							
								
									0cb9a8321b
								
							
						
					
					
						commit
						a75348cb71
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Abbott
						Tim Abbott