Since we have an interpolated string, let's try to keep the newlines inside the
interpolation region, rather than attached to the variables -- particularly when
it's multiple newlines. This makes it easier to read/visualize what the PR
description will look like.
Updated and trimmed some excessive whitespace. This doesn't cause a rendering
diff on the UI, but makes the raw output cleaner.
We now have the bot:
1. Doing the automated upgrade (bump version, src, recomputing hash)
2. Doing a full nixpkgs-review reverse closure rebuild
The next step for a human is to review the upstream changelog. Right now they
have to find it manually, but if `meta.changelog` is set, this commit adds a
link to it directly in the PR description .
Resolves#44
We're no longer running this on `staging` PRs, and users doing single-package
updates have the option to omit `nixpkgs-review`, so we should only include the
PR comment section if it was actually run.
This continues to enhance the automated tests for the PR comment formatting,
so you can see what the diff looks like just by looking at the test suite!
1. We should always use `~/.cache/nixpkgs`, since if we do it in PWD the hard
resets risk blowing away user work!
2. Previously, we weren't fetching and resetting to up-to-date master, which
meant cmds would fail if your nixpkgs checkout was stale.
3. Previously, we were ignoring the `--pr` option entirely. This fixes that bug
by passing the bool into the UpdateEnv, and also cleans up the selected options
in the logger so it's easier to see.
4. We were including the title PR twice, like this:
https://github.com/NixOS/nixpkgs/pull/86624
There are still some issues and things to improve, but with this PR I've managed
to get a working usage here:
https://github.com/NixOS/nixpkgs/pull/86625
Having the tests makes it easier to visualize what's going on, because we can
just look at the test output data. This is not foolproof, since one of the IO
helper functions could generate bad data to pass to the pure helper, but it's
better than nothing.
This refactors as much as possible to keep the PR description logic in the pure
`prComment` function, rather than computing it in multiple places, which also
increases out unit test coverage.
regenerate haskell nix file (drops hex dependency)
apply ormolu to a few files
fixup cabal file
add polysemy logger interpretation of Output, fix bug in nixEvalSem bug
* nixEvalSem was accidentally not stripping the output
create test_data and simplify RewriteSpec to use it
move Polysemy interpretation stacks closer to where polysemy methods are made
eventually these will move more top level but for now this keeps it
more contained
update to ghc883, remove raw-strings-qq dep