humbug_trac: Don't send some updates without a comment.
(imported from commit 2cf5e8c2fc1cefcbfe440b2e29d89b78f19205e6)
This commit is contained in:
		
							parent
							
								
									f3646d9c56
								
							
						
					
					
						commit
						68e96c0617
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		|  | @ -63,6 +63,14 @@ class HumbugPlugin(Component): | |||
|         `old_values` is a dictionary containing the previous values of the | ||||
|         fields that have changed. | ||||
|         """ | ||||
|         if not comment and set(old_values.keys()) <= set(["priority", "milestone", | ||||
|                                                           "cc", "keywords", | ||||
|                                                           "component"]): | ||||
|             # This is probably someone going through trac and updating | ||||
|             # the priorities; this can result in a lot of messages | ||||
|             # nobody wants to read, so don't send them without a comment. | ||||
|             return | ||||
| 
 | ||||
|         content = "%s updated %s" % (author, markdown_ticket_url(ticket)) | ||||
|         if comment: | ||||
|             content += ' with comment: %s\n\n' % (markdown_block(comment,)) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Abbott
						Tim Abbott