commit: bb724ed0d883b0dc7522fd263d1447d8aee348a7 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> AuthorDate: Sun Nov 23 18:10:35 2025 +0000 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> CommitDate: Sun Nov 23 18:10:35 2025 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgdev.git/commit/?id=bb724ed0
bugs: --api-key is now required Resolves: https://github.com/pkgcore/pkgdev/issues/217 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> src/pkgdev/scripts/argparsers.py | 3 ++- src/pkgdev/scripts/pkgdev_bugs.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pkgdev/scripts/argparsers.py b/src/pkgdev/scripts/argparsers.py index 9ab58da..3ac378b 100644 --- a/src/pkgdev/scripts/argparsers.py +++ b/src/pkgdev/scripts/argparsers.py @@ -48,11 +48,12 @@ def _determine_git_repo(parser, namespace): class BugzillaApiKey: @classmethod - def mangle_argparser(cls, parser): + def mangle_argparser(cls, parser, required=False): parser.add_argument( "--api-key", metavar="TOKEN", help="Bugzilla API key", + required=required, docs=""" The Bugzilla API key to use for authentication. WARNING: using this option will expose your API key to other users of the same system. diff --git a/src/pkgdev/scripts/pkgdev_bugs.py b/src/pkgdev/scripts/pkgdev_bugs.py index 271c793..919326c 100644 --- a/src/pkgdev/scripts/pkgdev_bugs.py +++ b/src/pkgdev/scripts/pkgdev_bugs.py @@ -46,7 +46,7 @@ bugs = ArgumentParser( quiet=False, parents=(cwd_repo_argparser,), ) -BugzillaApiKey.mangle_argparser(bugs) +BugzillaApiKey.mangle_argparser(bugs, required=True) bugs.add_argument( "targets", metavar="target",
