New command “niv changelog”
It’d be ultra nice to display a diff of the changelog (CHANGELOG.md on GH) when updating a GitHub repo. Alternatively there could also be a niv changelog command that just displays the changes since the last rev.
Hey. Thanks for creating niv! I know that this comment is not really contributing, but I just wanted to tell you that this feature would be great to have; I would love to see the list of commits (maybe a GitHub compare page) comparing the old and the new version.
@nomeata suggested outputting the equivalent of
git log --oneline --first-parent oldhash..lasthash
Or, more flexible, include a field in the sources config that contains a command line to run that outputs the changes, with placeholders for old and new rev. Then some projects can print a diff of a changelog, others a git log with specific flags or directories.
Given that we now have Github Actions like https://github.com/knl/niv-updater-action that do most of the heavy lifiting, is there still a need for this in Niv? It adds a lot of complexity.
I would argue that this functionality should be moved from niv-updater-action to niv: The Github action should just be a simple way to automate something that I can also do manually. And indeed, I might have a dependency that I update weekly via github action, but sometimes I need to manually update it out-of-band. Surely, this should not mean I get a less useful commit message (i.e. no nice summary of changes)!
I think I agree with @nomeata here. The one big problem, which is the same problem blocking #111, is that there is not way to get the list of commits from Git (say "metadata") without fetching the repo content. This is a big, big problem for e.g. repo like nixpkgs.
I guess for both #111 and this we could make the metadata fetching optional, i.e. only add the timestamps or fetch the history when some CLI flag is set. Does someone want to have a go at that?