plugin tickets, merge_requests: renamed "tickets" feature to "lists":
this feature is more generic than only "tickets" for technical stuff, thus the name "lists" seems more appropriate.
This commit is contained in:
parent
28798940d7
commit
8aebf00194
1 changed files with 23 additions and 21 deletions
|
|
@ -26,7 +26,7 @@ from sat_frontends.jp import common
|
|||
from sat_frontends.jp.constants import Const as C
|
||||
from . import base
|
||||
|
||||
__commands__ = ["Ticket"]
|
||||
__commands__ = ["List"]
|
||||
|
||||
FIELDS_MAP = "mapping"
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ class Get(base.CommandBase):
|
|||
pubsub_flags={C.MULTI_ITEMS},
|
||||
pubsub_defaults={"service": _("auto"), "node": _("auto")},
|
||||
use_output=C.OUTPUT_LIST_XMLUI,
|
||||
help=_("get tickets"),
|
||||
help=_("get lists"),
|
||||
)
|
||||
|
||||
def add_parser_options(self):
|
||||
|
|
@ -51,8 +51,8 @@ class Get(base.CommandBase):
|
|||
async def start(self):
|
||||
await common.fill_well_known_uri(self, os.getcwd(), "tickets", meta_map={})
|
||||
try:
|
||||
tickets_data = data_format.deserialise(
|
||||
await self.host.bridge.ticketsGet(
|
||||
lists_data = data_format.deserialise(
|
||||
await self.host.bridge.listGet(
|
||||
self.args.service,
|
||||
self.args.node,
|
||||
self.args.max,
|
||||
|
|
@ -64,10 +64,10 @@ class Get(base.CommandBase):
|
|||
type_check=list
|
||||
)
|
||||
except Exception as e:
|
||||
self.disp(f"can't get tickets: {e}", error=True)
|
||||
self.disp(f"can't get lists: {e}", error=True)
|
||||
self.host.quit(C.EXIT_BRIDGE_ERRBACK)
|
||||
else:
|
||||
await self.output(tickets_data[0])
|
||||
await self.output(lists_data[0])
|
||||
self.host.quit(C.EXIT_OK)
|
||||
|
||||
|
||||
|
|
@ -211,10 +211,10 @@ class Import(base.CommandBase):
|
|||
await self.set_progress_id(progress_id)
|
||||
|
||||
|
||||
class Ticket(base.CommandBase):
|
||||
class List(base.CommandBase):
|
||||
subcommands = (Get, Import)
|
||||
|
||||
def __init__(self, host):
|
||||
super(Ticket, self).__init__(
|
||||
host, "ticket", use_profile=False, help=_("tickets handling")
|
||||
super(List, self).__init__(
|
||||
host, "list", use_profile=False, help=_("pubsub lists handling")
|
||||
)
|
||||
Loading…
Reference in a new issue