Chromium Code Reviews| Index: rietveld.py |
| diff --git a/rietveld.py b/rietveld.py |
| index 0e3d40540a99dcf8fd934240984e2c023e26b3fd..a8b8da52bc8e25ee7942e62374fdd720d6d1ea0f 100644 |
| --- a/rietveld.py |
| +++ b/rietveld.py |
| @@ -66,14 +66,29 @@ class Rietveld(object): |
| def post_issue_data(self, issue, req, payload): |
| return self.post_data('%s/%s' % (issue, req), payload) |
| - def post_comment(self, issue, comment, submit_inline_comments=False): |
| + def post_message(self, issue, comment, subject=None, send_mail=False): |
|
agable
2013/08/27 14:49:19
This method isn't called anywhere? Was publish_inl
Mattias Nissler (ping if slow)
2013/08/27 15:08:41
There are no unit tests, I just wanted to keep the
|
| publish_payload = { |
| - 'message_only': 0 if submit_inline_comments else 1, |
| - 'send_mail': 1, |
| - 'add_as_reviewer': 0, |
|
agable
2013/08/27 14:49:19
Does add_as_reviewer default to 0?
Mattias Nissler (ping if slow)
2013/08/27 15:08:41
It's no longer supported by rietveld.
|
| 'message': comment, |
| + 'message_only': 1, |
| 'no_redirect': 1, |
| + 'send_mail': 1 if send_mail else 0, |
| } |
| + if subject is not None: |
| + publish_payload['subject'] = subject |
| + self.post_issue_data(issue, 'publish', publish_payload) |
| + |
| + def publish_inline_comments(self, issue, comment, reviewers, cc, |
| + subject=None, send_mail=False): |
| + publish_payload = { |
| + 'cc': cc, |
| + 'message': comment, |
| + 'message_only': 0, |
| + 'no_redirect': 1, |
| + 'reviewers': reviewers, |
| + 'send_mail': 1 if send_mail else 0, |
| + } |
| + if subject is not None: |
| + publish_payload['subject'] = subject |
| self.post_issue_data(issue, 'publish', publish_payload) |
| def add_inline_comment(self, issue_id, patchset_id, patch_id, line, a_or_b, |