Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue show: add --comments flag to print notes & discussions for issue #256

Merged
merged 3 commits into from
Nov 30, 2018

Conversation

claytonrcarter
Copy link
Collaborator

See #207.

  • default: do not print comments (current behavior)
  • added -c/--comments flag to print comments as well as normal issue show output. I put this behind a flag b/c it became immediately obvious after I started using it locally that I have 2 use cases for viewing issues: viewing the issue metadata (descriptions, todos, labels, deadlines, etc) and viewing the discussions. If comments are printed on every show, it's tedious to scroll up past them to view the meta.
  • does not print the system notes (like "soandso added label 'bug'" or '... changed the description')
  • I had to upgrade the version of go-gitlab to 0.11.3 in order to get the Discussions API.

The format of the comments is not sacred. I just wanted to get something in place to get to discussion started.

Sample Output from https://gitlab.com/claytonrcarter/test/issues/2

$ ./lab issue show crc-testing 2 --comments

#2 Test issue for notes & discussions.
===================================
This is just an issues for testing notes and discussions in `lab`.
-----------------------------------
Project: claytonrcarter/test
Status: Open
Assignees:
Author: claytonrcarter
Milestone: None
Due Date: None
Time Stats: None
Labels:
WebURL: https://gitlab.com/claytonrcarter/test/issues/2

-----------------------------------
claytonrcarter commented at 2018-11-12 02:52:18.178 +0000 UTC

This comment is a note. (Comment 1.)

-----------------------------------
claytonrcarter started a discussion at 2018-11-12 02:52:39.251 +0000 UTC

    This comment is a discussion. (Comment 2.)

    -----------------------------------
    claytonrcarter commented at 2018-11-12 02:53:13.168 +0000 UTC

    This is a comment on the discussion. (Comment 2a.)

    -----------------------------------
    claytonrcarter commented at 2018-11-12 02:55:19.244 +0000 UTC

    This is another comment on the discussion. (Comment 2b.)

-----------------------------------
claytonrcarter started a discussion at 2018-11-12 02:55:28.528 +0000 UTC

    Another discussion. (Comment 3.)

-----------------------------------
claytonrcarter commented at 2018-11-12 02:56:23.967 +0000 UTC

Another comment. (Comment 4.)

@codecov
Copy link

codecov bot commented Nov 29, 2018

Codecov Report

Merging #256 into master will decrease coverage by 0.01%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #256      +/-   ##
==========================================
- Coverage   69.58%   69.56%   -0.02%     
==========================================
  Files          44       44              
  Lines        2446     2481      +35     
==========================================
+ Hits         1702     1726      +24     
- Misses        575      583       +8     
- Partials      169      172       +3
Impacted Files Coverage Δ
internal/gitlab/gitlab.go 42.78% <50%> (+0.15%) ⬆️
cmd/issue_show.go 92.4% <77.77%> (-7.6%) ⬇️
cmd/issue.go 63.15% <0%> (-5.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e088723...a785286. Read the comment docs.

@zaquestion
Copy link
Owner

Opened a support ticket with Codacy about the reviews taking FOREVER lately. I'm just gonna merge this in.

@zaquestion zaquestion merged commit 751950f into zaquestion:master Nov 30, 2018
@claytonrcarter claytonrcarter deleted the issue-show-comments branch November 30, 2018 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants