From a7eada4c64582bf043c1834e2340c89ebfd1e986 Mon Sep 17 00:00:00 2001 From: farhaanbukhsh Date: Mar 01 2016 04:05:28 +0000 Subject: [PATCH 1/4] Add description to each plugin --- diff --git a/pagure/hooks/__init__.py b/pagure/hooks/__init__.py index f004f25..c8a2c42 100644 --- a/pagure/hooks/__init__.py +++ b/pagure/hooks/__init__.py @@ -41,6 +41,7 @@ class BaseHook(object): name = None form = None + description = None @classmethod def set_up(cls, project): diff --git a/pagure/hooks/fedmsg.py b/pagure/hooks/fedmsg.py index 75fa30e..f99f6a7 100644 --- a/pagure/hooks/fedmsg.py +++ b/pagure/hooks/fedmsg.py @@ -59,6 +59,7 @@ class Fedmsg(BaseHook): ''' Fedmsg hooks. ''' name = 'Fedmsg' + description = 'This hook push the commit messages to the Fedora bus to be consumed by other applications' form = FedmsgForm db_object = FedmsgTable backref = 'fedmsg_hook' diff --git a/pagure/hooks/irc.py b/pagure/hooks/irc.py index a1f88ff..e82e563 100644 --- a/pagure/hooks/irc.py +++ b/pagure/hooks/irc.py @@ -96,6 +96,7 @@ class Hook(BaseHook): ''' IRC hooks. ''' name = 'IRC' + description='This hook sends message to the mention channel regarding the changes made by the pushes to the git repository.' form = IrcForm db_object = IrcTable backref = 'irc_hook' diff --git a/pagure/hooks/mail.py b/pagure/hooks/mail.py index ff0053c..8c2932b 100644 --- a/pagure/hooks/mail.py +++ b/pagure/hooks/mail.py @@ -65,6 +65,7 @@ class Mail(BaseHook): ''' Mail hooks. ''' name = 'Mail' + description = 'Generate notification emails for pushes to a git repository. This hook sends emails describing changes introduced by pushes to a git repository' form = MailForm db_object = MailTable backref = 'mail_hook' diff --git a/pagure/hooks/pagure_hook.py b/pagure/hooks/pagure_hook.py index 2f8898c..adfdbfb 100644 --- a/pagure/hooks/pagure_hook.py +++ b/pagure/hooks/pagure_hook.py @@ -60,6 +60,7 @@ 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.' form = PagureForm db_object = PagureTable backref = 'pagure_hook' diff --git a/pagure/hooks/pagure_request_hook.py b/pagure/hooks/pagure_request_hook.py index 66f6346..3d9a1d6 100644 --- a/pagure/hooks/pagure_request_hook.py +++ b/pagure/hooks/pagure_request_hook.py @@ -62,6 +62,7 @@ class PagureRequestHook(BaseHook): ''' Pagure request hook. ''' name = 'pagure requests' + description='Pagure specific hook to update pull-requests stored in the database based on the information pushed in the requests git repository.' form = PagureRequestsForm db_object = PagureRequestsTable backref = 'pagure_hook_requests' diff --git a/pagure/hooks/pagure_ticket_hook.py b/pagure/hooks/pagure_ticket_hook.py index 2fdda30..14897d8 100644 --- a/pagure/hooks/pagure_ticket_hook.py +++ b/pagure/hooks/pagure_ticket_hook.py @@ -61,6 +61,7 @@ class PagureTicketHook(BaseHook): ''' Pagure ticket hook. ''' name = 'pagure tickets' + description = 'Pagure specific hook to update tickets stored in the database based on the information pushed in the tickets git repository.' form = PagureTicketsForm db_object = PagureTicketsTable backref = 'pagure_hook_tickets' diff --git a/pagure/templates/plugin.html b/pagure/templates/plugin.html index 4dab88a..85d499b 100644 --- a/pagure/templates/plugin.html +++ b/pagure/templates/plugin.html @@ -16,6 +16,7 @@
+
{{ plugin.description }}
{% for field in fields %} {{ render_field_in_row(field) }} From 0c320766196c78d4f430217221ff7d28a9af965e Mon Sep 17 00:00:00 2001 From: farhaanbukhsh Date: Mar 01 2016 04:05:28 +0000 Subject: [PATCH 2/4] Fix h6 to p --- diff --git a/pagure/templates/plugin.html b/pagure/templates/plugin.html index 85d499b..5b48567 100644 --- a/pagure/templates/plugin.html +++ b/pagure/templates/plugin.html @@ -16,7 +16,7 @@ -
{{ plugin.description }}
+

{{ plugin.description }}

{% for field in fields %} {{ render_field_in_row(field) }} From 9b97b4b1d1a08201bb2139b845873a5be63277c9 Mon Sep 17 00:00:00 2001 From: farhaanbukhsh Date: Mar 01 2016 04:05:28 +0000 Subject: [PATCH 3/4] Fix long description split into lines --- diff --git a/pagure/hooks/fedmsg.py b/pagure/hooks/fedmsg.py index f99f6a7..4ccb304 100644 --- a/pagure/hooks/fedmsg.py +++ b/pagure/hooks/fedmsg.py @@ -44,7 +44,7 @@ class FedmsgTable(BASE): backref=backref( 'fedmsg_hook', cascade="delete, delete-orphan", single_parent=True) - ) + ) class FedmsgForm(wtf.Form): @@ -59,7 +59,8 @@ class Fedmsg(BaseHook): ''' Fedmsg hooks. ''' name = 'Fedmsg' - description = 'This hook push the commit messages to the Fedora bus to be consumed by other applications' + description = 'This hook push the commit messages'\ + ' to the Fedora bus to be consumed by other applications' form = FedmsgForm db_object = FedmsgTable backref = 'fedmsg_hook' diff --git a/pagure/hooks/irc.py b/pagure/hooks/irc.py index e82e563..8d73eab 100644 --- a/pagure/hooks/irc.py +++ b/pagure/hooks/irc.py @@ -52,7 +52,7 @@ class IrcTable(BASE): backref=backref( 'irc_hook', cascade="delete, delete-orphan", single_parent=True) - ) + ) class IrcForm(wtf.Form): @@ -96,7 +96,8 @@ class Hook(BaseHook): ''' IRC hooks. ''' name = 'IRC' - description='This hook sends message to the mention channel regarding the changes made by the pushes to the git repository.' + description = 'This hook sends message to the mention channel regarding'\ + ' the changes made by the pushes to the git repository.' form = IrcForm db_object = IrcTable backref = 'irc_hook' @@ -124,10 +125,10 @@ class Hook(BaseHook): # Install the hook itself #hook_file = os.path.join(hook_files, 'git_irc.py') - #if not os.path.exists(hook_file): - #os.symlink( - #hook_file, - #os.path.join(repopath, 'hooks', 'post-receive.irc') + # if not os.path.exists(hook_file): + # os.symlink( + # hook_file, + # os.path.join(repopath, 'hooks', 'post-receive.irc') #) @classmethod @@ -141,5 +142,5 @@ class Hook(BaseHook): repopath = get_repo_path(project) #hook_path = os.path.join(repopath, 'hooks', 'post-receive.irc') - #if os.path.exists(hook_path): - #os.unlink(hook_path) + # if os.path.exists(hook_path): + # os.unlink(hook_path) diff --git a/pagure/hooks/mail.py b/pagure/hooks/mail.py index 8c2932b..4a59f5a 100644 --- a/pagure/hooks/mail.py +++ b/pagure/hooks/mail.py @@ -46,7 +46,7 @@ class MailTable(BASE): backref=backref( 'mail_hook', cascade="delete, delete-orphan", single_parent=True) - ) + ) class MailForm(wtf.Form): @@ -65,7 +65,8 @@ class Mail(BaseHook): ''' Mail hooks. ''' name = 'Mail' - description = 'Generate notification emails for pushes to a git repository. This hook sends emails describing changes introduced by pushes to a git repository' + description = 'Generate notification emails for pushes to a git repository.'\ + 'This hook sends emails describing changes introduced by pushes to a git repository' form = MailForm db_object = MailTable backref = 'mail_hook' diff --git a/pagure/hooks/pagure_hook.py b/pagure/hooks/pagure_hook.py index adfdbfb..f47f402 100644 --- a/pagure/hooks/pagure_hook.py +++ b/pagure/hooks/pagure_hook.py @@ -45,7 +45,7 @@ class PagureTable(BASE): backref=backref( 'pagure_hook', cascade="delete, delete-orphan", single_parent=True) - ) + ) class PagureForm(wtf.Form): @@ -60,7 +60,8 @@ 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 = 'Pagure specific hook to add comment on issues'\ + ' if the commits fixes or relates to an issue.' form = PagureForm db_object = PagureTable backref = 'pagure_hook' diff --git a/pagure/hooks/pagure_request_hook.py b/pagure/hooks/pagure_request_hook.py index 3d9a1d6..b37d209 100644 --- a/pagure/hooks/pagure_request_hook.py +++ b/pagure/hooks/pagure_request_hook.py @@ -47,7 +47,7 @@ class PagureRequestsTable(BASE): backref=backref( 'pagure_hook_requests', cascade="delete, delete-orphan", single_parent=True) - ) + ) class PagureRequestsForm(wtf.Form): @@ -62,7 +62,8 @@ class PagureRequestHook(BaseHook): ''' Pagure request hook. ''' name = 'pagure requests' - description='Pagure specific hook to update pull-requests stored in the database based on the information pushed in the requests git repository.' + description = 'Pagure specific hook to update pull-requests stored'\ + 'in the database based on the information pushed in the requests git repository.' form = PagureRequestsForm db_object = PagureRequestsTable backref = 'pagure_hook_requests' diff --git a/pagure/hooks/pagure_ticket_hook.py b/pagure/hooks/pagure_ticket_hook.py index 14897d8..f55d323 100644 --- a/pagure/hooks/pagure_ticket_hook.py +++ b/pagure/hooks/pagure_ticket_hook.py @@ -46,7 +46,7 @@ class PagureTicketsTable(BASE): backref=backref( 'pagure_hook_tickets', cascade="delete, delete-orphan", single_parent=True) - ) + ) class PagureTicketsForm(wtf.Form): @@ -61,7 +61,8 @@ class PagureTicketHook(BaseHook): ''' Pagure ticket hook. ''' name = 'pagure tickets' - description = 'Pagure specific hook to update tickets stored in the database based on the information pushed in the tickets git repository.' + description = 'Pagure specific hook to update tickets stored in the database'\ + 'based on the information pushed in the tickets git repository.' form = PagureTicketsForm db_object = PagureTicketsTable backref = 'pagure_hook_tickets' From 94a19afa3ff3d2579d4135c1d0a162fb497b5112 Mon Sep 17 00:00:00 2001 From: farhaanbukhsh Date: Mar 01 2016 08:08:09 +0000 Subject: [PATCH 4/4] Fix the commented code --- diff --git a/pagure/hooks/irc.py b/pagure/hooks/irc.py index 8d73eab..3fd6187 100644 --- a/pagure/hooks/irc.py +++ b/pagure/hooks/irc.py @@ -125,10 +125,10 @@ class Hook(BaseHook): # Install the hook itself #hook_file = os.path.join(hook_files, 'git_irc.py') - # if not os.path.exists(hook_file): - # os.symlink( - # hook_file, - # os.path.join(repopath, 'hooks', 'post-receive.irc') + #if not os.path.exists(hook_file): + #os.symlink( + #hook_file, + #os.path.join(repopath, 'hooks', 'post-receive.irc') #) @classmethod @@ -142,5 +142,5 @@ class Hook(BaseHook): repopath = get_repo_path(project) #hook_path = os.path.join(repopath, 'hooks', 'post-receive.irc') - # if os.path.exists(hook_path): - # os.unlink(hook_path) + #if os.path.exists(hook_path): + #os.unlink(hook_path)