Browse Source

Clarify output when page 1 has no issues when listing by label (Fix #570).

master
poikilos 3 years ago
parent
commit
08ce6649c8
  1. 18
      utilities/enissue.py

18
utilities/enissue.py

@ -2307,6 +2307,9 @@ def main():
else: else:
sys.exit(1) sys.exit(1)
total_count = 0 total_count = 0
print()
# ^ This blank line goes after "@ Cache" messages and before
# the issues list.
if mode == "labels": if mode == "labels":
if repo.labels is None: if repo.labels is None:
print("There were no labels.") print("There were no labels.")
@ -2404,13 +2407,10 @@ def main():
elif mode == "list": elif mode == "list":
print() print()
if len(match_all_labels) > 0: if len(match_all_labels) > 0:
print("{} issue(s) matched {}".format(
match['count'],
" + ".join("'{}'".format(s) for s in match_all_labels)
))
if total_count >= repo.page_size: if total_count >= repo.page_size:
print("{} searched, which is the maximum number" print("{} found but only {} searched, which is the"
" per page.".format(total_count)) " maximum number per page."
"".format(match['count'], total_count))
next_page = 2 next_page = 2
if repo.page is not None: if repo.page is not None:
next_page = repo.page + 1 next_page = repo.page + 1
@ -2418,6 +2418,12 @@ def main():
+ " page " + str(next_page)) + " page " + str(next_page))
print("to see additional pages.") print("to see additional pages.")
else:
print("{} issue(s) matched {}".format(
match['count'],
" + ".join("'{}'".format(s) for s in match_all_labels)
))
else: else:
if repo.page is not None: if repo.page is not None:
print("{} issue(s) are showing for page" print("{} issue(s) are showing for page"

Loading…
Cancel
Save