OLD | NEW |
1 # coding: utf-8 | 1 # coding: utf-8 |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 """Defines class Rietveld to easily access a rietveld instance. | 5 """Defines class Rietveld to easily access a rietveld instance. |
6 | 6 |
7 Security implications: | 7 Security implications: |
8 | 8 |
9 The following hypothesis are made: | 9 The following hypothesis are made: |
10 - Rietveld enforces: | 10 - Rietveld enforces: |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 return cls._local_changes.get(issue, {}) | 510 return cls._local_changes.get(issue, {}) |
511 | 511 |
512 @property | 512 @property |
513 def url(self): | 513 def url(self): |
514 return self._rietveld.url | 514 return self._rietveld.url |
515 | 515 |
516 @property | 516 @property |
517 def email(self): | 517 def email(self): |
518 return self._rietveld.email | 518 return self._rietveld.email |
519 | 519 |
| 520 @property |
| 521 def password(self): |
| 522 return self._rietveld.password |
| 523 |
520 def get_pending_issues(self): | 524 def get_pending_issues(self): |
521 pending_issues = self._rietveld.get_pending_issues() | 525 pending_issues = self._rietveld.get_pending_issues() |
522 | 526 |
523 # Filter out issues we've closed or unchecked the commit checkbox. | 527 # Filter out issues we've closed or unchecked the commit checkbox. |
524 return [issue for issue in pending_issues | 528 return [issue for issue in pending_issues |
525 if not self._get_local_changes(issue).get('closed', False) and | 529 if not self._get_local_changes(issue).get('closed', False) and |
526 self._get_local_changes(issue).get('commit', True)] | 530 self._get_local_changes(issue).get('commit', True)] |
527 | 531 |
528 def close_issue(self, issue): # pylint:disable=R0201 | 532 def close_issue(self, issue): # pylint:disable=R0201 |
529 logging.info('ReadOnlyRietveld: closing issue %d' % issue) | 533 logging.info('ReadOnlyRietveld: closing issue %d' % issue) |
(...skipping 29 matching lines...) Expand all Loading... |
559 def trigger_try_jobs( # pylint:disable=R0201 | 563 def trigger_try_jobs( # pylint:disable=R0201 |
560 self, issue, patchset, reason, clobber, revision, builders_and_tests, | 564 self, issue, patchset, reason, clobber, revision, builders_and_tests, |
561 master=None): | 565 master=None): |
562 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % | 566 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % |
563 (builders_and_tests, issue)) | 567 (builders_and_tests, issue)) |
564 | 568 |
565 def trigger_distributed_try_jobs( # pylint:disable=R0201 | 569 def trigger_distributed_try_jobs( # pylint:disable=R0201 |
566 self, issue, patchset, reason, clobber, revision, masters): | 570 self, issue, patchset, reason, clobber, revision, masters): |
567 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % | 571 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % |
568 (masters, issue)) | 572 (masters, issue)) |
OLD | NEW |