Set interactive=True, and limit=1000 by default for RHBZ. Proposed: https://github.com/williamh/pybugz/pull/111 Version: 0.13-1.gitbb0ae
52 lines
1.7 KiB
Diff
52 lines
1.7 KiB
Diff
From 0bd2517f92874c758ec30177c5df4ecdf222236b Mon Sep 17 00:00:00 2001
|
|
From: Pavel Raiskup <praiskup@redhat.com>
|
|
Date: Fri, 3 Dec 2021 13:41:53 +0100
|
|
Subject: [PATCH] Query limit to be configurable
|
|
|
|
Red Hat Bugzilla applied policy that anonymous queries can get at most
|
|
20 lines in the API output, and authenticated queries up to 1000.
|
|
|
|
So it is probably a good idea to "push" Red Hat maintainers to the
|
|
authentication (interactive=True) a little bit more and set some
|
|
reasonable default limit (limit=1000), otherwise the output will be very
|
|
limited (and there's a risk that user misses some bugs thinking that the
|
|
output is complete).
|
|
|
|
Both of those options can be changed in $HOME/.bugzrc.
|
|
|
|
Proposed:
|
|
https://github.com/williamh/pybugz/pull/111
|
|
---
|
|
bugz/settings.py | 5 +++++
|
|
pybugz.d/redhat.conf | 2 ++
|
|
2 files changed, 7 insertions(+)
|
|
|
|
diff --git a/bugz/settings.py b/bugz/settings.py
|
|
index c45481c..1666f38 100644
|
|
--- a/bugz/settings.py
|
|
+++ b/bugz/settings.py
|
|
@@ -123,6 +123,11 @@ class Settings:
|
|
else:
|
|
self.insecure = False
|
|
|
|
+ if not hasattr(self, 'limit'):
|
|
+ if config.has_option(self.connection, 'limit'):
|
|
+ self.limit = get_config_option(config.get, self.connection,
|
|
+ 'limit')
|
|
+
|
|
if getattr(self, 'encoding', None) is not None:
|
|
log_info('The encoding option is deprecated.')
|
|
|
|
diff --git a/pybugz.d/redhat.conf b/pybugz.d/redhat.conf
|
|
index 36712a5..ec9d293 100644
|
|
--- a/pybugz.d/redhat.conf
|
|
+++ b/pybugz.d/redhat.conf
|
|
@@ -1,3 +1,5 @@
|
|
[RedHat]
|
|
base = https://bugzilla.redhat.com/xmlrpc.cgi
|
|
search_statuses = NEW, ASSIGNED, MODIFIED, ON_DEV, POST
|
|
+interactive = True
|
|
+limit = 1000
|
|
--
|
|
2.33.1
|
|
|