"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pkg/cmd/issue/view/view.go" between
gh-cli-1.10.3.tar.gz and gh-cli-1.11.0.tar.gz

About: GitHub CLI is GitHub’s official command line tool.

view.go  (gh-cli-1.10.3):view.go  (gh-cli-1.11.0)
skipping to change at line 163 skipping to change at line 163
fmt.Fprintf(out, "author:\t%s\n", issue.Author.Login) fmt.Fprintf(out, "author:\t%s\n", issue.Author.Login)
fmt.Fprintf(out, "labels:\t%s\n", labels) fmt.Fprintf(out, "labels:\t%s\n", labels)
fmt.Fprintf(out, "comments:\t%d\n", issue.Comments.TotalCount) fmt.Fprintf(out, "comments:\t%d\n", issue.Comments.TotalCount)
fmt.Fprintf(out, "assignees:\t%s\n", assignees) fmt.Fprintf(out, "assignees:\t%s\n", assignees)
fmt.Fprintf(out, "projects:\t%s\n", projects) fmt.Fprintf(out, "projects:\t%s\n", projects)
var milestoneTitle string var milestoneTitle string
if issue.Milestone != nil { if issue.Milestone != nil {
milestoneTitle = issue.Milestone.Title milestoneTitle = issue.Milestone.Title
} }
fmt.Fprintf(out, "milestone:\t%s\n", milestoneTitle) fmt.Fprintf(out, "milestone:\t%s\n", milestoneTitle)
fmt.Fprintf(out, "number:\t%d\n", issue.Number)
fmt.Fprintln(out, "--") fmt.Fprintln(out, "--")
fmt.Fprintln(out, issue.Body) fmt.Fprintln(out, issue.Body)
return nil return nil
} }
func printHumanIssuePreview(opts *ViewOptions, issue *api.Issue) error { func printHumanIssuePreview(opts *ViewOptions, issue *api.Issue) error {
out := opts.IO.Out out := opts.IO.Out
now := opts.Now() now := opts.Now()
ago := now.Sub(issue.CreatedAt) ago := now.Sub(issue.CreatedAt)
cs := opts.IO.ColorScheme() cs := opts.IO.ColorScheme()
// Header (Title and State) // Header (Title and State)
fmt.Fprintln(out, cs.Bold(issue.Title)) fmt.Fprintf(out, "%s #%d\n", cs.Bold(issue.Title), issue.Number)
fmt.Fprintf(out, fmt.Fprintf(out,
"%s • %s opened %s • %s\n", "%s • %s opened %s • %s\n",
issueStateTitleWithColor(cs, issue.State), issueStateTitleWithColor(cs, issue.State),
issue.Author.Login, issue.Author.Login,
utils.FuzzyAgo(ago), utils.FuzzyAgo(ago),
utils.Pluralize(issue.Comments.TotalCount, "comment"), utils.Pluralize(issue.Comments.TotalCount, "comment"),
) )
// Reactions // Reactions
if reactions := prShared.ReactionGroupList(issue.ReactionGroups); reactio ns != "" { if reactions := prShared.ReactionGroupList(issue.ReactionGroups); reactio ns != "" {
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)