Break the workflow into multiple scripts to make it easier to test /
maintain. Also fix the remove reviewer process to not review reviews
from people that were manually requested.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Better support updating existing PRs and summary of changes in workflow
summary. Tested in nixvim.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
We dont want need to maintain duplicate entries for maintainers in HM
that already exist in Nixpkgs. Add a check that calls out users that
don't need an entry in our internal list.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
We just need to run it once properly and dont need to keep running it
for every push until the last.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
We want to ping maintainers whenever files are affected. Right now it
requires changing a PR to a draft and reopening, but we should be more
clever and request the review whenever the file is updated.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Was relying on flawed logic and fragile parsing to identify maintainers
on changed files. Rework to use nix eval to grab the `meta.maintainers`
to use when requesting a review.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Previously, we had to hack together some string matching to identify and
retrieve the maintainers in the repo. We can just eval the modules to
retrieve the list of maintainers more accurately.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Cancel existing runs when a new push happens so we don't unnecessarily
run jobs that are irrelevant.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
We need to make sure that we don't insert invalid maintainers otherwise
it breaks the RFC39 invite workflow. Check that we have valid nix and
the required attributes are able to be parsed properly.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Want to create an easier way to notify maintainers that someone is
working on their module. Added a workflow for requesting a review from any maintainers that have joined the `home-manager-maintainers` team in the organization.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
We need a nixpkgs on NIX_PATH. Right now we have been using the latest
from channel. But, we can actually just fetch the nixpkgs from our
flake.lock by parsing the flake.lock.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Not every PR requires the overhead of spinning up runners and running
our entire test suite. Filter on paths affected and only run the
relevant steps.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Currently only running on the master branch. But, we can schedule on the
release branch, as well.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Right now, we grab the latest home-manager pushed to remote. We need to
test against the code we are pushing out.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
currently ./format does a bunch of stuff with git that was only necessary for nixfmt but not nixfmt-tree, so I deleted it (just use treefmt command directly instead). I also added keep sorted to keep the really long module lists sorted (already used in nixpkgs).
Import-from-derivation (IFD) has problematic performance, and is disabled in
Nixpkgs by policy. It is arguably good practice for libraries to avoid
it whenever possible, as it has poor ergonomics in some cases,
especially with dry builds, as it requires multiple eval+build phases.
As such, prevent its use in Home Manager by default by putting existing
tests that use IFD behind a config. In CI, run a first pass with IFD
disabled, skipping tests without the config. Then run a second pass with
IFD enabled and including tests with the config. This second pass will
also run tests without the config, but they should be cached from the
previous run, so the cost is not double (only eval time should be paid
twice). It’s necessary to change from using NMT’s `run` to `build` as
`run` itself uses IFD.
Of the tests that have the config:
- kitty/theme-to-themeFile: this is a test for deprecated config, and so
should be removed eventually anyway
- podman: the implementation relies on IFD to create individual systemd
units from the derivation output, and so it is not straightforward to
remove the IFD; doing so would require rethinking how the module works
to instead have the systemd unit files included as-is rather than as
individually configured units in the Nix config.