| |
@@ -10,6 +10,7 @@
|
| |
from blockerbugs.util.update_sync import UpdateSync
|
| |
from blockerbugs.util.bz_interface import BlockerBugs
|
| |
import blockerbugs.util.discussion_sync as discussion_sync
|
| |
+ import blockerbugs.util.pagure_bot as pagure_bot
|
| |
from blockerbugs.models.bug import Bug
|
| |
from alembic.config import Config as al_Config
|
| |
from alembic import command as al_command
|
| |
@@ -219,6 +220,10 @@
|
| |
|
| |
discussion_sync.recreate_discussion(bugid)
|
| |
|
| |
+ def update_discussion(args):
|
| |
+ ticket_id = int(args.ticket_id)
|
| |
+ pagure_bot.webhook_handler(ticket_id)
|
| |
+
|
| |
|
| |
def main():
|
| |
parser = ArgumentParser()
|
| |
@@ -296,6 +301,13 @@
|
| |
help='Bug ID for which to re-create dicsussion')
|
| |
recreate_discussion_parser.set_defaults(func=recreate_discussion)
|
| |
|
| |
+ update_discussion_parser = subparsers.add_parser('update-discussion',
|
| |
+ help='Update discussion for a given ticket')
|
| |
+ update_discussion_parser.add_argument('ticket_id',
|
| |
+ metavar='<Ticket ID>',
|
| |
+ help='Ticket ID for which to update dicsussion')
|
| |
+ update_discussion_parser.set_defaults(func=update_discussion)
|
| |
+
|
| |
args = parser.parse_args()
|
| |
|
| |
if not hasattr(args, 'func'):
|
| |
This allows to manually process a particular discussion ticket in Pagure, recount
the votes and update the description. It is probably mostly useful for testing,
because it allows you to test blocker discussions functionality without setting
up your own Pagure instead and configuring the webhook.