From b2804e24a8a8eb34f25fcc3b7014329ffc070076 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Apr 05 2016 17:26:20 +0000 Subject: Improve description of pagure hook --- diff --git a/pagure/hooks/pagure_hook.py b/pagure/hooks/pagure_hook.py index d381f6b..8ba51f9 100644 --- a/pagure/hooks/pagure_hook.py +++ b/pagure/hooks/pagure_hook.py @@ -56,12 +56,32 @@ class PagureForm(wtf.Form): ) +DESCRIPTION = ''' +Pagure specific hook to add a comment to issues if the pushed commits fix them +or relate to them. This is determined based on the commit message. + +To reference an issue you need to use one of recognized keywords followed by an +issue number. The number can optionally be preceded by `#` symbol. +Capitalization does not matter; neither does the colon between keyword and +number. + + * fix + * fixed + * fixes + * relate + * related + * relates + +Instead of an issue number, you can use full URL of the issue. This way it is +possible to reference issues in other projects. +''' + + class PagureHook(BaseHook): ''' Pagure hook. ''' name = 'Pagure' - description = 'Pagure specific hook to add comment on issues'\ - ' if the commits fixes or relates to an issue.' + description = DESCRIPTION form = PagureForm db_object = PagureTable backref = 'pagure_hook'