Skip to content

Commit

Permalink
add link to tag in commit header
Browse files Browse the repository at this point in the history
Signed-off-by: jolheiser <john.olheiser@gmail.com>
  • Loading branch information
jolheiser committed Jun 19, 2023
1 parent 27502f7 commit a923339
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,18 @@ func printCommits(repo vcs.Repo) {
Foreground(lipgloss.Color(theme.colorMagenta))
// headerDimStyle := lipgloss.NewStyle().
// Foreground(lipgloss.Color(dimColor))
sinceTag := repo.LastRelease.TagName
if sinceTag == "" {
sinceTag = "creation"
sinceTag := "creation"
if repo.LastRelease.TagName != "" {
sinceTag = repo.LastRelease.TagName
if useLinks {
sinceTag = termenv.Hyperlink(repo.LastRelease.URL, sinceTag)
}
}
sinceTag = headerStyle.Render(sinceTag)

fmt.Printf("\n🔥 %s %s\n",
headerStyle.Render(fmt.Sprintf("%s %s",
pluralize(len(commits), "commit since", "commits since"),
sinceTag)),

fmt.Printf("\n🔥 %s %s %s\n",
headerStyle.Render(pluralize(len(commits), "commit since", "commits since")),
sinceTag,
headerStyle.Render(fmt.Sprintf("(%s)",
humanize.Time(repo.LastRelease.PublishedAt))),
)
Expand Down

0 comments on commit a923339

Please sign in to comment.