Skip to content

Commit

Permalink
Do not display comment thread by default
Browse files Browse the repository at this point in the history
When the comment thread gets long it can be pretty distracting; you
expect to see issue details but instead of shown several screens of
text.

Comment thread can be displayed using the "--comments" option, like
this:

    $ issue show --comments <issue>
  • Loading branch information
marekjm committed Feb 6, 2019
1 parent f3aa723 commit 8b48179
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion issue.py
Expand Up @@ -1541,7 +1541,7 @@ def commandShow(ui):
print('\n{}: {}\n'.format(closing_git_commit_heading, closing_git_commit))

issue_comment_thread = dict((issue_data['comments'][key]['timestamp'], key) for key in issue_data['comments'])
if issue_comment_thread:
if issue_comment_thread and '--comments' in ui:
comment_thread_heading = '---- COMMENT THREAD:'
comment_thread_heading = colorise('white', comment_thread_heading)
print('\n{}'.format(comment_thread_heading))
Expand Down
2 changes: 1 addition & 1 deletion issue/__init__.py
Expand Up @@ -9,4 +9,4 @@
from . import objects


__version__ = '0.2.11'
__version__ = '0.2.12'
11 changes: 10 additions & 1 deletion ui.json
Expand Up @@ -524,7 +524,8 @@
"doc": {
"help": "Show information about issues.",
"usage": [
"show <sha1>"
"show <issue>",
"show --comments <issue>"
]
},
"options": {
Expand All @@ -539,11 +540,19 @@
"short": "i",
"long": "index",
"help": "index selected issue before showing it"
},
{
"short": "c",
"long": "comments",
"help": "show comment thread (if exists)"
}
]
},
"commands": {
"log": {
"doc": {
"help": "Show history of an issue"
},
"operands": {
"no": [1, 1],
"help": {
Expand Down

0 comments on commit 8b48179

Please sign in to comment.