From e9f38cd0ce2b1eda130634f8569f5521c2c6511d Mon Sep 17 00:00:00 2001 From: Arthur Zamarin Date: Fri, 31 May 2024 14:13:08 +0300 Subject: mask: support comma separated bugs Signed-off-by: Arthur Zamarin --- src/pkgdev/scripts/pkgdev_mask.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pkgdev/scripts/pkgdev_mask.py b/src/pkgdev/scripts/pkgdev_mask.py index 041eef1..1d614a0 100644 --- a/src/pkgdev/scripts/pkgdev_mask.py +++ b/src/pkgdev/scripts/pkgdev_mask.py @@ -61,9 +61,10 @@ mask_opts.add_argument( mask_opts.add_argument( "-b", "--bug", + "--bugs", dest="bugs", - action="append", - type=arghparse.positive_int, + action=arghparse.CommaSeparatedValuesAppend, + default=[], help="reference bug in the mask comment", docs=""" Add a reference to a bug in the mask comment. May be specified multiple @@ -100,6 +101,8 @@ def _mask_validate(parser, namespace): atoms = set() maintainers = set() + namespace.bugs = list(map(int, dict.fromkeys(namespace.bugs))) + if not namespace.rites and namespace.file_bug: mask.error("bug filing requires last rites") if namespace.file_bug and not namespace.api_key: -- cgit v1.2.3-65-gdbad