aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-05-31 14:13:08 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2024-05-31 14:13:08 +0300
commite9f38cd0ce2b1eda130634f8569f5521c2c6511d (patch)
tree4c034ed723cf0cfa96332a9dd13dc65400d9cee2
parentmask: support auto filing of last-rite bug & PMASKED bugs (diff)
downloadpkgdev-e9f38cd0ce2b1eda130634f8569f5521c2c6511d.tar.gz
pkgdev-e9f38cd0ce2b1eda130634f8569f5521c2c6511d.tar.bz2
pkgdev-e9f38cd0ce2b1eda130634f8569f5521c2c6511d.zip
mask: support comma separated bugs
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r--src/pkgdev/scripts/pkgdev_mask.py7
1 files 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: