Commit Graph

22 Commits

Author SHA1 Message Date
Ryan Mulligan
9f8166a7f9 nix: update eval commands 2023-01-03 19:53:27 -08:00
Ryan Mulligan
47815a5e87 remove Time
I want to remobe Polysemy and this was using that. There is no need to
add time to log messages anyway, since we're using the systemd journal.
2023-01-01 15:43:47 -08:00
Ryan Hendrickson
0d8c37c2ec Abort if existing PR targets newer version 2022-09-03 18:55:11 -04:00
Ryan Mulligan
5ae5261c11 add --atterpath flag to support exact attrpath update info 2021-08-27 12:15:26 -07:00
Arnout Engelen
bcc5172190
More lenient version check
To also match output such as `version 30GB 2.34 linux amd64`

Fixes #256
2021-03-23 21:15:17 +01:00
Ryan Mulligan
5749f0029a Remove cachix option
If you want to continue to use cachix, you need to set up a post-build
hook that pushes to cachix instead of using nixpkgs-update.
2020-08-17 21:11:26 -07:00
Ryan Mulligan
29d54a2496 fix tests 2020-07-29 22:02:22 -07:00
Benjamin Hipple
84fa7f7781 Pull GitHub Username from hub cfg instead of hard-coding r-ryantm
Resolves #192

Also avoids the unqualified import on `GitHub` in GH.hs, since this lib's types
are already complex/confusing enough without the ambiguity!
2020-06-06 22:43:22 -04:00
Benjamin Hipple
ebee2aa0d4 Link to meta.changelog in PR description
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
2020-05-10 19:58:57 -04:00
Benjamin Hipple
7f312dc1ff Hide section about NixPkgs review when it was skipped
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!
2020-05-03 12:05:21 -04:00
Benjamin Hipple
0b0beeca4d Trim newlines GitHub PR titles
The `interpolate` cmd by default is putting a trailing newline on this, as the
test case shows, so add an explicit `strip` to it.

Fixes #189
2020-05-02 14:21:43 -04:00
Benjamin Hipple
286f040859 Refactoring PR description helper and starting to add tests
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.
2020-04-22 23:46:17 -04:00
Ryan Mulligan
36f251fd73 optionally run nixpkgs-review 2020-04-13 19:33:21 -07:00
Ryan Mulligan
1e94e7a5bc fix RewriteSpec options 2020-04-06 21:02:59 -07:00
Ryan Mulligan
b30faed1b1 improve ux for single update case
* instead of --dry-run use --pr to indicate a PR is wanted
* instead of additional updates, have update take the update as an
argument
* print out stdout instead of log file in the case of non-batch
updates
* print PR message to log even in the case of no PR
2020-04-05 18:04:38 -07:00
Ryan Mulligan
a0a2e6afbe use Polysemy for File and Process, add test for quotedUrls
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
2020-04-04 14:08:14 -07:00
Ryan Mulligan
523681c6d8 Infrastructure upgrades to bump dependencies and cleanup build system
No functional change; this pulls out all of the changes except the `polysemy`
refactoring from here:
https://github.com/ryantm/nixpkgs-update/pull/172

This will allow us to do development with the newer GHC and cleaned up
dependency stack, start using the `hspec` test suite, vet the `github` library
updates, etc., while we work on porting more of the effects to polysemy and
evaluating how it looks.
2020-03-29 20:06:44 -04:00
Ryan Mulligan
c021ad573c Time: add doctests 2019-06-08 14:41:16 -07:00
Jan Tojnar
60c5186e94
run doctests again 2019-01-18 12:03:41 +01:00
Ryan Mulligan
e491f049f2 fix bugs introduced during refactoring 2018-12-24 15:23:52 -08:00
Jan Tojnar
70e0d37b2e
fix formatting of doctests 2018-04-06 17:41:14 +02:00
Jan Tojnar
61a5278e59
wip: convert check-attrpath-version.sh 2018-04-03 01:01:56 +02:00