~matsubara/tarmac/move-branch-logic

« back to all changes in this revision

Viewing changes to tarmac/plugins/commitmessage.py

  • Committer: Tarmac
  • Author(s): Paul Hummer
  • Date: 2010-10-26 18:59:01 UTC
  • mfrom: (376.2.1 review-url-commit-message)
  • Revision ID: paul@eventuallyanyway.com-20101026185901-p9gtf4fm00u5s92p
Add the review url to the commit message template plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
'''Tarmac plugin for enforcing a commit message format.'''
18
18
from tarmac.hooks import tarmac_hooks
19
19
from tarmac.plugins import TarmacPlugin
 
20
from tarmac.utility import get_review_url
20
21
 
21
22
 
22
23
class CommitMessageTemplate(TarmacPlugin):
107
108
        return ",".join(
108
109
            str(bug.id) for bug in self._proposal.source_branch.linked_bugs)
109
110
 
 
111
    @property
 
112
    def review_url(self):
 
113
        return get_review_url(self._proposal)
 
114
 
110
115
 
111
116
tarmac_hooks['tarmac_pre_commit'].hook(CommitMessageTemplate(),
112
117
    'Commit messsage template editor.')