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

cmd: Add Issue show command #66

Merged
merged 2 commits into from
Dec 17, 2017
Merged

Conversation

nkprince007
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Dec 17, 2017

Codecov Report

Merging #66 into master will increase coverage by 0.81%.
The diff coverage is 64.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #66      +/-   ##
==========================================
+ Coverage   55.83%   56.64%   +0.81%     
==========================================
  Files          21       22       +1     
  Lines         969     1038      +69     
==========================================
+ Hits          541      588      +47     
- Misses        287      299      +12     
- Partials      141      151      +10
Impacted Files Coverage Δ
cmd/issue.go 45.45% <25%> (+5.45%) ⬆️
internal/gitlab/gitlab.go 31.92% <50%> (+0.7%) ⬆️
cmd/issueShow.go 72.72% <72.72%> (ø)

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 50d2075...a057d77. Read the comment docs.

Copy link
Owner

@zaquestion zaquestion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, few small comments

cmd/issueShow.go Outdated

var issueShowCmd = &cobra.Command{
Use: "show [remote]",
ArgAliases: []string{"s", "d"},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a regular alias for get

Aliases: []string{"get"}

Also, consider dropping "d" as a short alias "d" makes me think "delete" over "describe".

assignee = issue.Assignee.Username
}

fmt.Printf(`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a template, but I'm tempted to say we can follow up on it.
Sample: https://github.com/zaquestion/lab/blob/master/cmd/issueCreate.go#L71

cmd/issueShow.go Outdated
if err != nil {
log.Fatal(err)
}
remote, _, err := parseArgsRemote(args)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The beginning of this function can just be

remote, issueNumber, err := parseArgsRemote(args)

cmd/issue.go Outdated
},
}

func init() {
issueCmd.Flags().BoolP("list", "l", false, "list issues")
issueCmd.Flags().BoolP("create", "c", false, "create new issue")
Copy link
Owner

@zaquestion zaquestion Dec 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we drop the create flag out of this pr? I wanna think about it more.

@nkprince007 nkprince007 merged commit 7ca971f into zaquestion:master Dec 17, 2017
@nkprince007 nkprince007 deleted the issue-show branch December 17, 2017 08:26
@zaquestion zaquestion modified the milestone: 0.8.0 Dec 20, 2017
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