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

Changelog support for smart-release (continuation 2) #209

Merged
merged 50 commits into from
Oct 3, 2021

Conversation

Byron
Copy link
Member

@Byron Byron commented Sep 26, 2021

Fix for #198.

  • fix history traversal/change computation
  • reorder parsed tags as well (see git-packetline); the first headline indent should rule all of them
  • don't re-add statistical items unless there is none present (to allow deletion of them)
  • add a flag to add no statistical headline
  • headlines for git-conventional kinds along with descriptions which can be hidden by keeping only their html tag around
  • add flag for making no git-conventional based insertions (or extend previous one, probably better to identify these with names)
  • deduce version bump by looking at the changelog
  • find a solution for Reference links, currently they get lost entirely
  • add GitHub links for release headlines
  • add headline for links to issues and PRs that were worked on
  • add change-log related flags for smart-release sub-command (allowing to handle changelogs as part of a release), rewriting 'Unreleased' headers into their respective tag name and date.
  • create a tag object instead of tag reference if changelog is present, containing the changelog itself as text
  • warn if the changelog needs updating, so we would have to compare the newly generated changelog with the one that's present
  • consider automating GitHub releases with gh release create - it supposedly pulls contents from tag objects, but it should be easy to pass them. More information here.

After merge, release and fix #204, and setup install validation for smart-release.


…which comes with the benefit of not needing to be parsed back at all.
We will just treat it as marker when parsing, knowing that it will
be replaced with the same (or updated) information during merge.

This allows to create more elaborate statistics without adding
effort to parse this back - this effort is spent exlusively
where it matters, with the git-conventional sections that
are in fact user-editable.
…to help handling parsed/statistical/read-only types even better
…instead of also avoiding the changelog to be written.

Otherwise statistics wouldn't be updated if its not rewritten.
Now that only drives whether or not we get to preview a changelog,
which won't happen if there is nothing relevant, like statistics
or headline changes.
…parsing really needs a headline and it's probably ok to provide it.
Otherwise parsing would be more complicated and it shouldn't be that
way now.
…as the latter is hard to keep in line with the markdown, especially if
it's markdown itself. Instead, people can click the commit link that
github will auto-generate.
…as they forgot to turn off gpg signing.
…which changed due to larger changelogs.
…and learn that the top-level crate definitely needs another approach
for details as it simply is affected by all commits.
Previously when accessing a packed object, it would store the base
object into the pack cache (if it wasn't retrieved from there)
which is great if that operation is free.

Since it isn't, it's better not to stress the cache with puts
and trash more objects than necessary.

Now only the last decompressed object will be put into the LRU cache.
This really helps with conveniently adjusting the changelog to your
needs.
…even though it's not working correctly judging by a few samples.
…to enable dealing with parent lookups specifically.
…which fixes an over-abundance of commits showing up in the details
section even though they didn't actually contribute.
…for some more absolute order of what we would have gotten otheriwse.
…and verify that unparsable inbetweens are bound to their closest
parseable headline.
…with it being added only if there is no other section present yet.
That way changelogs can be configured intuitively.
With it one can omit auto-generated sections of the given name.
…to allow disabling various changelog segments like clippy, or commit
statistics.

Note that it's always possible to delete individual sections afterwards.
…which reveals a lot of issues with a few core pieces of logic.
Nothing terrible, but some tests need to be written to nail it.
@Byron
Copy link
Member Author

Byron commented Oct 3, 2021

Rollup changes from a week to avoid long-running PRs.

@Byron Byron merged commit af9d137 into main Oct 3, 2021
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.

cargo-smart-release fails to install
1 participant