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

Tailor output to look better on a GitHub releases page #104

Merged
merged 4 commits into from
Sep 18, 2023

Conversation

wagoodman
Copy link
Contributor

@wagoodman wagoodman commented Sep 12, 2023

This PR tries to clean up the markdown format and go for a more minimal appearance:

Today:

Screenshot 2023-09-12 at 2 55 03 PM

With changes: (and title set to empty string)

Screenshot 2023-09-14 at 2 37 15 PM

Note this removes the version / vcs url / date from the top lines of the output. What's really happening is that the title has been set to "", however, it would default to {{ .Version }} if nothing is provided. I wanted to remove the top lines since the github releases page already has this information, for example:

Screenshot 2023-09-14 at 2 38 42 PM

...with the top fields removed it reads a lot better. However, there may be users that are depending on the version being somewhere in the top of the document. For that reason the title now allows for templating and defaults to {{ .Version }}.

Detailed changes:

  • if there is no title, do not render it (leaves out a since # at the top of the document)
  • allow for templating in the user title and set the default title to the .Version value
  • condense link annotations by removing square brackets and removing unnecessary words such as Issue and PR
  • adds all reference links in a single parenthetical statement
  • add @ in front of usernames (which the releases page should incorporate in a "contributors" footer)
  • ensure each changelog entry does not end in punctuation. This is to separate out the change description from the references.
  • full changelog link has been moved to the bottom of the document since it allows for a deeper, more raw dive into the changes, and leaves the summary of changes to flow to the top of the document.

Fixes #87

@wagoodman wagoodman added the enhancement New feature or request label Sep 12, 2023
@wagoodman
Copy link
Contributor Author

wagoodman commented Sep 12, 2023

Failing CI will be fixed by #105 (I'm using go 1.21.1 locally, so go mod tidy really messed with things here) merged 🎉 🌮

@wagoodman wagoodman requested a review from a team September 13, 2023 18:37
@wagoodman wagoodman enabled auto-merge (squash) September 13, 2023 18:44
@wagoodman wagoodman disabled auto-merge September 13, 2023 19:03
@@ -71,7 +82,7 @@ func (m Presenter) formatChangeSections(changes change.Changes) string {
result += formatChangeSection(section.Title, summaries) + "\n"
}
}
return result
return strings.TrimRight(result, "\n")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we now need to remove trailing newlines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now there is a footer and it became noticeable that we have a large amount of whitespace before the footer -- this makes the whitespace between the content and footer smaller

@wagoodman wagoodman merged commit 24b308b into main Sep 18, 2023
6 checks passed
@wagoodman wagoodman deleted the cleanup-md-format branch September 18, 2023 15:43
@wagoodman wagoodman self-assigned this Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add templating that covers github release page features
2 participants