Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add "OperaCritic-Repository" to Critic e-mails

  • Loading branch information...
commit 5185b1f0068e5dd987dc3d36edd15ece4b5f5e01 1 parent 06f2fd6
@mo mo authored
Showing with 4 additions and 1 deletion.
  1. +3 −1 mailutils.py
  2. +1 −0  reviewing/mail.py
View
4 mailutils.py
@@ -28,7 +28,7 @@ def generateMessageId(index=1):
return "%s.%s.%04d" % (timestamp, timestamp_ms, index)
-def queueMail(from_user, to_user, recipients, subject, body, review_url=None, review_association=None, message_id=None, parent_message_id=None):
+def queueMail(from_user, to_user, recipients, subject, body, review_url=None, review_association=None, review_repository=None, message_id=None, parent_message_id=None):
if not message_id: message_id = generateMessageId()
filename = "%s/%s_%s_%s.txt.pending" % (configuration.paths.OUTBOX, from_user.name, to_user.name, message_id)
@@ -39,6 +39,8 @@ def queueMail(from_user, to_user, recipients, subject, body, review_url=None, re
headers["OperaCritic-URL"] = review_url
if review_association:
headers["OperaCritic-Association"] = review_association
+ if review_repository:
+ headers["OperaCritic-Repository"] = review_repository
print >> file, repr({ "message_id": message_id,
"parent_message_id": parent_message_id,
View
1  reviewing/mail.py
@@ -38,6 +38,7 @@ def sendMail(db, review, message_id, from_user, to_user, recipients, subject, bo
return queueMail(from_user, to_user, recipients, subject, body,
review_url=review.getURL(db, to_user),
review_association=review.getUserAssociation(db, to_user),
+ review_repository=str(review.repository),
message_id=message_id,
parent_message_id=parent_message_id)
Please sign in to comment.
Something went wrong with that request. Please try again.